[Patch] Fix for fpc_val_smallint_shortstr
This is a follow up to #39406 (closed).
Previous patches supplied by me only covered 64-bit and 32-bit CPU.
I now also examined the signed val-helpers for 16-bit and 8-bit CPU's.
I cannot test on an actual 8 or 16 bit computer (or VM).
The original code of fpc_val_smallint_shortstr (isolated and tested on 32-bit) produces 10998 errors when tested with valid input in the range '-65536' .. '65536'. It fails only for negative input, i.e. it fails for '-10' (Code=3), but succeeds for '-11' (which is a bit odd).
Attached is a patch that fixes fpc_val_smallint_shortstr.
It uses a similar approach as for the 32- and 64-bit signed val-helpers.
The patched code runs as expected.
The fpc_val_longint_shortstr() helper seems to be OK. (But that should be verified with actual 8- or 16-bit code.)