(Crude) Cyclic Type Checking

This commit is contained in:
Ginger Bill
2016-12-04 23:25:52 +00:00
parent 76e724718c
commit c71b547cde
8 changed files with 209 additions and 164 deletions
+1 -1
View File
@@ -58,7 +58,7 @@ ExactValue make_exact_value_integer_from_string(String string) {
// TODO(bill): Allow for numbers with underscores in them
ExactValue result = {ExactValue_Integer};
i32 base = 10;
if (string.text[0] == '0') {
if (string.len > 2 && string.text[0] == '0') {
switch (string.text[1]) {
case 'b': base = 2; break;
case 'o': base = 8; break;