On 2020-01-18 21:42, Paul Procacci wrote:
Sorry. Not a WINAPI expert, nor do I want to be. ;)
The $nSize variable looks fishy. Can it ever contain a value that's <= 2?
If so, you're in for a surprise one day. ;)
Bedtime.
~Paul
Hi Paul,
Great catch. Thank you for the peer preview!
-T
I now looks like:
if not $lpBuffer[ 0 ] == -1 { # -1 = 0xFF (it gets coersed)
means nothing was returned
loop (my $Index=0; $Index < $nSize - 2 ; $Index += 2) {
my byte $i = $lpBuffer[ $Index ] +| 0x00;
if $i eq 0x00 { last; }
$ErrorString ~= chr ( $i );
}
}