staticlibs / ccronexpr

Cron expression parsing in ANSI C
Apache License 2.0
150 stars 78 forks source link

Fix read uint records #30

Closed akapust1n closed 4 years ago

akapust1n commented 4 years ago

Hello. strtol cant read correcly records like "08", "09". strtol read this numbers like numbers from octal number system. It is unusual behavior.

"If the value of base is ​0​, the numeric base is auto-detected: if the prefix is 0, the base is octal, if the prefix is 0x or 0X, the base is hexadecimal, otherwise the base is decimal." https://en.cppreference.com/w/cpp/string/byte/strtol

staticlibs commented 4 years ago

Thanks! Merged.