Skip to content

Commit

Permalink
Merge pull request #416 from texane/stlink_gui_fix_warning_overflow
Browse files Browse the repository at this point in the history
stlink_gui: Fix compiler warning on overflow
  • Loading branch information
xor-gate committed May 16, 2016
2 parents 1e36628 + 0c07627 commit 0f6dcbd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/tools/gui/stlink-gui.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
#include <errno.h>
#include <gtk/gtk.h>

Expand Down Expand Up @@ -183,14 +184,14 @@ hexstr_to_guint32 (const gchar *str, GError **err)
g_quark_from_string ("hextou32"),
1,
"Invalid hexstring");
return LONG_MAX;
return UINT32_MAX;
}
if (end_ptr == str) {
g_set_error (err,
g_quark_from_string ("hextou32"),
2,
"Invalid hexstring");
return LONG_MAX;
return UINT32_MAX;
}
return val;
}
Expand Down

0 comments on commit 0f6dcbd

Please sign in to comment.