jonathanstowe / TermReadKey

Character mode terminal access for Perl
12 stars 27 forks source link

missing check for undefined values on win32 #41

Open LorenzoTa opened 1 year ago

LorenzoTa commented 1 year ago

Hello and thanks for your work,

the win32 version of the module seems to not check for undefined values in the ReadKey sub. This should be around line 678 (line 476 of the on the fly created module).

So I suppose that the line: if ($_[0] || $CurrentMode >= 3) should be something like: if ( defined $_[0] || $CurrentMode >= 3)

See also this perlmonks thread

Thanks for reading

L*