mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-02-24 04:00:02 +01:00
fix comment on division by 0 check
This commit is contained in:
@@ -37,7 +37,7 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator
|
||||
}
|
||||
|
||||
// check for division by zero
|
||||
// We check if the string contains a slash followed by space (optional) and zero. Whereas the zero must not followed by dot or comma as this indicates a number with decimal digits. The zero must also not be followed by other digits.
|
||||
// We check if the string contains a slash followed by space (optional) and zero. Whereas the zero must not be followed by a dot, comma, or 'x'/'X' as these indicate a number with decimal digits or a hexadecimal value respectively. The zero must also not be followed by other digits.
|
||||
if (new Regex("\\/\\s*0(?![,\\.0-9xX])").Match(input).Success)
|
||||
{
|
||||
error = Properties.Resources.wox_plugin_calculator_division_by_zero;
|
||||
|
||||
Reference in New Issue
Block a user