windows_taskbar icon indicating copy to clipboard operation
windows_taskbar copied to clipboard

setProgress results in a crash, when input data is greater than 32 bit

Open Tienisto opened this issue 1 year ago • 0 comments

When calling setProgress with a large number that is valid in Dart code (because Dart int is always 64 bit), the application will crash.

Reproduction:

await WindowsTaskbar.setProgress(0, 2147483647 + 1);

Relevant code line: https://github.com/alexmercerind/windows_taskbar/blob/f2f28ead73f87f889e455675ad08fb7318863ed5/windows/windows_taskbar.cc#L42

Either scale down the input data on Dart side, or on native side. For example, I've scaled it down on Dart side: https://github.com/localsend/localsend/pull/1512

Tienisto avatar Jul 16 '24 00:07 Tienisto