projects
/
emu8051.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add option no-define to AM_INIT_AUTOMAKE
[emu8051.git]
/
src
/
gtk
/
regwin.c
diff --git
a/src/gtk/regwin.c
b/src/gtk/regwin.c
index
2358685
..
d3fcb8d
100644
(file)
--- a/
src/gtk/regwin.c
+++ b/
src/gtk/regwin.c
@@
-88,10
+88,16
@@
regwin_cell_edited(GtkCellRendererText *cell, gchar *path_string,
/* Read current (old) value. */
gtk_tree_model_get(model, &iter, COL_VAL, &str, -1);
/* Read current (old) value. */
gtk_tree_model_get(model, &iter, COL_VAL, &str, -1);
+ /* No need to check error, has already been validated. */
old = asciihex2int(str);
log_info(" old value: $%04X", old);
new = asciihex2int(new_str);
old = asciihex2int(str);
log_info(" old value: $%04X", old);
new = asciihex2int(new_str);
+ if (asciihex2int_get_error()) {
+ log_warn(" new value: invalid");
+ return;
+ }
+
log_info(" new value: $%04X", new);
/* Store new value in emulator register (if in range). */
log_info(" new value: $%04X", new);
/* Store new value in emulator register (if in range). */