OhMyBug

input/serialization

NaN Comparison Passes Threshold Check

#71rare5 sightingsfirst seen September 2026

What goes wrong

A lenient numeric parse turns a malformed value into NaN (not-a-number), and every comparison with NaN is false. So a 'reject if greater than the limit' check sees 'not greater' and lets the garbage value through as compliant.

Example

Parsing 'abc' as a number gives NaN; the check 'reject if quantity is over 100' is false, so an order with quantity 'abc' is accepted.

Not to be confused with

Not a checker that received no input (Missing Input Green Gate); the check runs, on a non-number, and none of its comparisons can fire — compare Storage range escapes input validation.

Discovered by

Field notes · 2