fix bug in stringInsertBytesAtMaybeAlloc()

This commit is contained in:
Tenari
2026-07-29 07:25:56 -05:00
parent 1c8a0c27b2
commit 2662516d94
2 changed files with 12 additions and 1 deletions
+7
View File
@@ -149,6 +149,13 @@ fn u64 u64SafeMul(u64 x, u64 y) {
fn f32 f32FromString(String s) {
f32 result = 0.0f;
if (s.length == 0) { return result; }
// TODO handle +/- for sign
/*
* while (*s == ' ') s++;
float sign = 1.0f;
if (*s == '-') { sign = -1.0f; s++; }
else if (*s == '+') s++;
* */
ptr c = s.bytes;
while (*c >= '0' && *c <= '9') {
result = result * 10.0f + (*c++ - '0');