-
Notifications
You must be signed in to change notification settings - Fork 0
Wrong type format #1
Copy link
Copy link
Open
Description
The type formats have been a pain, and aren't always the same crossplatform, even today.
However, in the 64bit era, this little change should fix some rare bugs:
diff --git a/include/libsdlang.h b/include/libsdlang.h
index 8376957..4e4a6a2 100644
--- a/include/libsdlang.h
+++ b/include/libsdlang.h
@@ -1229,10 +1229,10 @@ extern "C"
_SDLANG_EMIT_RETURN(slice);
return error;
case SDLANG_VALUE_TYPE_FLOATING:
- slice.length = sprintf(buffer, "%lf", v.floatValue);
+ slice.length = sprintf(buffer, "%Lf", v.floatValue);
return emitter(slice, userData);
case SDLANG_VALUE_TYPE_INTEGER:
- slice.length = sprintf(buffer, "%lld", v.intValue);
+ slice.length = sprintf(buffer, "%zu", v.intValue);
return emitter(slice, userData);
case SDLANG_VALUE_TYPE_NULL:
return emitter({"null", 4}, userData);
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels