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
No related branches found
No related tags found
No related merge requests found
...@@ -730,8 +730,9 @@ char* iniSetULongInt(str_list_t* list, const char* section, const char* key, ulo ...@@ -730,8 +730,9 @@ 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 char* iniSetHexInt(str_list_t* list, const char* section, const char* key, uint value
,ini_style_t* style) ,ini_style_t* style)
{ {
char str[INI_MAX_VALUE_LEN]; char str[INI_MAX_VALUE_LEN] = "0";
if(value)
SAFEPRINTF(str,"0x%x",value); SAFEPRINTF(str,"0x%x",value);
return iniSetString(list, section, key, str, style); return iniSetString(list, section, key, str, style);
} }
...@@ -739,8 +740,9 @@ char* iniSetHexInt(str_list_t* list, const char* section, const char* key, uint ...@@ -739,8 +740,9 @@ char* iniSetHexInt(str_list_t* list, const char* section, const char* key, uint
char* iniSetHexInt64(str_list_t* list, const char* section, const char* key, uint64_t value char* iniSetHexInt64(str_list_t* list, const char* section, const char* key, uint64_t value
,ini_style_t* style) ,ini_style_t* style)
{ {
char str[INI_MAX_VALUE_LEN]; char str[INI_MAX_VALUE_LEN] = "0";
if(value)
SAFEPRINTF(str,"0x%" PRIx64, value); SAFEPRINTF(str,"0x%" PRIx64, value);
return iniSetString(list, section, key, str, style); 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