1
0
Fork 0
mirror of https://github.com/notwa/lips synced 2024-11-14 17:19:02 -08:00

actually actually fix octal numbers

This commit is contained in:
Connor Olding 2015-12-25 01:04:08 -08:00
parent 59c4802ff8
commit 46b1cbea5a

View file

@ -559,7 +559,7 @@ end
function Lexer:read_octal()
local buff = self:read_chars('[0-7]')
local num = tonumber(buff)
local num = tonumber(buff, 8)
if not num then self:error('invalid octal number') end
return num
end