mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 13:11:28 +00:00
A few bugs crept in during the conversion to LPEG parsing: 1. Unicode parsing of UTF-16 surrogate pairs returned an ending position that was off by 2, so that the last 2 characters in the escape code were parsed as literal characters. 2. Arrays and objects were not being tagged as such with make_array and make_object during parsing. This commit fixes these bugs, and returns to using unicode.utf8_enc for UTF-8 encoding instead of a separately-defined function. Also, the tests at the end (which were helpful in finding both of the bugs above) were converted to unittest.lua tests.
12 KiB
12 KiB