Skip to content
Snippets Groups Projects
Commit 242ba34e authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

When writing hex integer values, use "0" rather than "0x0"

upgrade_to_v320.js sets these values to just "0", so let's not thrash on the
format.
parent bbfa2ca4
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #3770 passed
......@@ -730,18 +730,20 @@ char* iniSetULongInt(str_list_t* list, const char* section, const char* key, ulo
char* iniSetHexInt(str_list_t* list, const char* section, const char* key, uint value
,ini_style_t* style)
{
char str[INI_MAX_VALUE_LEN];
char str[INI_MAX_VALUE_LEN] = "0";
SAFEPRINTF(str,"0x%x",value);
if(value)
SAFEPRINTF(str,"0x%x",value);
return iniSetString(list, section, key, str, style);
}
char* iniSetHexInt64(str_list_t* list, const char* section, const char* key, uint64_t value
,ini_style_t* style)
{
char str[INI_MAX_VALUE_LEN];
char str[INI_MAX_VALUE_LEN] = "0";
SAFEPRINTF(str,"0x%" PRIx64, value);
if(value)
SAFEPRINTF(str,"0x%" PRIx64, value);
return iniSetString(list, section, key, str, style);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment