Skip to content

Commit 68029a6

Browse files
committed
fix for IndexOf bug
1 parent 753cba5 commit 68029a6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Source/Menu/Notifications/NotificationManager.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,13 +248,13 @@ private Check CheckExcludes(Check check)
248248
return check;
249249
break;
250250
case "installed_version":
251-
if (SystemInfo.Application.Version.IndexOf(c.Value, StringComparison.OrdinalIgnoreCase) > 0)
251+
if (SystemInfo.Application.Version.IndexOf(c.Value, StringComparison.OrdinalIgnoreCase) > -1)
252252
return check;
253253
break;
254254
case "system":
255255
var os = SystemInfo.OperatingSystem;
256256
var system = $"{os.Name} {os.Version} {os.Architecture} {os.Language} {os.Languages ?? new string[0]}";
257-
if (system.IndexOf(c.Value, StringComparison.OrdinalIgnoreCase) > 0)
257+
if (system.IndexOf(c.Value, StringComparison.OrdinalIgnoreCase) > -1)
258258
return check;
259259
break;
260260
default: // Any check that is not recognised fails.
@@ -286,13 +286,13 @@ private Check CheckIncludes(Check check)
286286
return check;
287287
break;
288288
case "installed_version":
289-
if (SystemInfo.Application.Version.IndexOf(c.Value, StringComparison.OrdinalIgnoreCase) > 0)
289+
if (SystemInfo.Application.Version.IndexOf(c.Value, StringComparison.OrdinalIgnoreCase) > -1)
290290
return check;
291291
break;
292292
case "system":
293293
var os = SystemInfo.OperatingSystem;
294294
var system = $"{os.Name} {os.Version} {os.Architecture} {os.Language} {os.Languages ?? new string[0]}";
295-
if (system.IndexOf(c.Value, StringComparison.OrdinalIgnoreCase) > 0)
295+
if (system.IndexOf(c.Value, StringComparison.OrdinalIgnoreCase) > -1)
296296
return check;
297297
break;
298298
default: // Any check that is not recognised fails.

0 commit comments

Comments
 (0)