1
0
Fork 0
mirror of https://github.com/notwa/lips synced 2024-05-05 10:53:23 -07: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