Skip to content

Commit

Permalink
improve combo_box
Browse files Browse the repository at this point in the history
  • Loading branch information
xianjimli committed Dec 7, 2023
1 parent 3a852ae commit 872da56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/widgets/combo_box.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ ret_t combo_box_parse_options(widget_t* widget, const char* str) {
int32_t value = 0;
const char* token = tokenizer_next(t);
if (*token) {
const char* text = tk_isdigit(*token) ? strchr(token, ':') : NULL;
const char* text = (*token == '-' || tk_isdigit(*token)) ? strchr(token, ':') : NULL;
if (text != NULL) {
text++;
value = tk_atoi(token);
Expand Down

0 comments on commit 872da56

Please sign in to comment.