File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7373 $hexStr = $script :luaString.Substring (
7474 $script :luaPos , 2
7575 )
76+ if ($hexStr -notmatch ' ^[0-9a-fA-F]{2}$' ) {
77+ throw ' Invalid \x escape sequence: expected two hexadecimal digits.'
78+ }
7679 $hexVal = [Convert ]::ToInt32($hexStr , 16 )
7780 $null = $result.Append ([char ]$hexVal )
7881 $script :luaPos += 2
9194 $script :luaString [$script :luaPos ] -ne ' }' ) {
9295 $script :luaPos ++
9396 }
97+ if ($script :luaPos -ge $script :luaString.Length ) {
98+ throw ' Invalid \u escape sequence: missing closing brace.'
99+ }
94100 $hexStr = $script :luaString.Substring (
95101 $hexStart ,
96102 $script :luaPos - $hexStart
Original file line number Diff line number Diff line change 4444 $script :luaPos ++ # skip [
4545 Skip-LuaWhitespace
4646 $key = Read-LuaValue
47+ if ($null -eq $key ) {
48+ throw ' Lua table keys cannot be nil.'
49+ }
4750 Skip-LuaWhitespace
4851 if ($script :luaPos -ge $script :luaString.Length -or
4952 $script :luaString [$script :luaPos ] -ne ' ]' ) {
You can’t perform that action at this time.
0 commit comments