Skip to content
Snippets Groups Projects
Commit 9d632d97 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 9dcf2409
Branches
Tags
No related merge requests found
......@@ -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.
Please register or to comment