-
-
Notifications
You must be signed in to change notification settings - Fork 492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix gcc truncate and overflow warnings #2649
base: main
Are you sure you want to change the base?
Fix gcc truncate and overflow warnings #2649
Conversation
|
||
char buf[sizeof "00:00"]; | ||
char buf[32]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you replaced sizeof "00:00"
with 32, we don't need 32 bytes here
@@ -248,8 +248,8 @@ static void saveOptions(Config* config) | |||
{ | |||
const struct StudioOptions* options = &config->data.options; | |||
|
|||
string buf; | |||
sprintf(buf.data, JSON( | |||
char buf[2048]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you removed using of string
struct and increased it from 1024 to 2048
@@ -237,7 +237,7 @@ static void drawTileIndex(Map* map, s32 x, s32 y) | |||
|
|||
if(index >= 0) | |||
{ | |||
char buf[sizeof "#9999"]; | |||
char buf[16]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here, we don't need 16 bytes here
I'll try to improve it |
No description provided.