mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Fix issue with -thread-count flag with <= 0 count
This commit is contained in:
@@ -56,7 +56,7 @@ generic_ftoa :: proc(buf: []byte, val: f64, fmt: byte, precision, bit_size: int)
|
|||||||
} else {
|
} else {
|
||||||
s = "+Inf";
|
s = "+Inf";
|
||||||
}
|
}
|
||||||
n := copy(buf, transmute([]byte)s);
|
n := copy(buf, s);
|
||||||
return buf[:n];
|
return buf[:n];
|
||||||
|
|
||||||
case 0: // denormalized
|
case 0: // denormalized
|
||||||
|
|||||||
+1
-1
@@ -483,7 +483,7 @@ bool parse_build_flags(Array<String> args) {
|
|||||||
isize count = cast(isize)big_int_to_i64(&value.value_integer);
|
isize count = cast(isize)big_int_to_i64(&value.value_integer);
|
||||||
if (count <= 0) {
|
if (count <= 0) {
|
||||||
gb_printf_err("%.*s expected a positive non-zero number, got %.*s\n", LIT(name), LIT(param));
|
gb_printf_err("%.*s expected a positive non-zero number, got %.*s\n", LIT(name), LIT(param));
|
||||||
build_context.thread_count = 0;
|
build_context.thread_count = 1;
|
||||||
} else {
|
} else {
|
||||||
build_context.thread_count = count;
|
build_context.thread_count = count;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user