windows_taskbar
windows_taskbar copied to clipboard
setProgress results in a crash, when input data is greater than 32 bit
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