Skip to content

Commit 4eaa63b

Browse files
authored
Merge pull request #14 from daleylin/master
Fixed string length check in the thermostat demo.
2 parents af6ae69 + 3205c82 commit 4eaa63b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

samples/demo_guix_thermostat/demo_guix_thermostat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ GX_STRING string;
122122

123123
gx_utility_ltoa(i_temperature, str_value, 10);
124124
string.gx_string_ptr = str_value;
125-
string.gx_string_length = sizeof(str_value) - 1;
125+
string.gx_string_length = GX_STRLEN(str_value);
126126
gx_prompt_text_set_ext(prompt, &string);
127127
}
128128

0 commit comments

Comments
 (0)