diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-06-21 17:48:50 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-06-21 17:48:50 +0100 |
| commit | 6b65ef6d8847ea7dcb23a556e12daae69738c5c2 (patch) | |
| tree | 45500c041503cef095540c0a76c39415e20408b9 | |
| parent | 35c102137f9a097584bf1af39e9809064293a0a3 (diff) | |
Fix compilation bug on Linux
| -rw-r--r-- | build.bat | 2 | ||||
| -rw-r--r-- | core/strconv.odin | 5 | ||||
| -rw-r--r-- | src/build_settings.cpp | 2 |
3 files changed, 5 insertions, 4 deletions
@@ -42,10 +42,10 @@ set linker_settings=%libs% %linker_flags% del *.pdb > NUL 2> NUL del *.ilk > NUL 2> NUL -rem odin run code/demo.odin cl %compiler_settings% "src\main.cpp" ^ /link %linker_settings% -OUT:%exe_name% ^ && odin run code/demo.odin + rem && odin docs core/fmt.odin del *.obj > NUL 2> NUL diff --git a/core/strconv.odin b/core/strconv.odin index 9800823f2..432526463 100644 --- a/core/strconv.odin +++ b/core/strconv.odin @@ -455,14 +455,15 @@ proc is_integer_negative(u: u128, is_signed: bool, bit_size: int) -> (unsigned: return u, neg; } -proc append_bits(buf: []u8, u_: u128, base: int, is_signed: bool, bit_size: int, digits: string, flags: IntFlag) -> string { +proc append_bits(buf: []u8, u: u128, base: int, is_signed: bool, bit_size: int, digits: string, flags: IntFlag) -> string { if base < 2 || base > MAX_BASE { panic("strconv: illegal base passed to append_bits"); } + var neg: bool; var a: [129]u8; var i = len(a); - var u, neg = is_integer_negative(u_, is_signed, bit_size); + u, neg = is_integer_negative(u, is_signed, bit_size); var b = u128(base); for u >= b { i--; a[i] = digits[uint(u % b)]; diff --git a/src/build_settings.cpp b/src/build_settings.cpp index 0c0c0a91c..99ab55d1c 100644 --- a/src/build_settings.cpp +++ b/src/build_settings.cpp @@ -142,7 +142,7 @@ String odin_root_dir(void) { String odin_root_dir(void) { String path = global_module_path; - Array(char) path_buf; + Array<char> path_buf; isize len, i; gbTempArenaMemory tmp; u8 *text; |