OSDN Git Service
(root)
/
handbrake-jp
/
handbrake-jp-git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LinGui: Make preset key/values mostly align with macui presets.
[handbrake-jp/handbrake-jp-git.git]
/
gtk
/
src
/
values.c
diff --git
a/gtk/src/values.c
b/gtk/src/values.c
index
4124b0a
..
d8dd743
100644
(file)
--- a/
gtk/src/values.c
+++ b/
gtk/src/values.c
@@
-683,16
+683,23
@@
ghb_array_len(const GValue *gval)
static void
xform_string_int(const GValue *sval, GValue *ival)
{
static void
xform_string_int(const GValue *sval, GValue *ival)
{
+ gchar *end;
+
const gchar *str = g_value_get_string(sval);
const gchar *str = g_value_get_string(sval);
- gint val = g_strtod(str, NULL);
+ gint val = g_strtod(str, &end);
+ if (*end)
+ val = ~0>>1;
g_value_set_int(ival, val);
}
static void
xform_string_int64(const GValue *sval, GValue *ival)
{
g_value_set_int(ival, val);
}
static void
xform_string_int64(const GValue *sval, GValue *ival)
{
+ gchar *end;
const gchar *str = g_value_get_string(sval);
const gchar *str = g_value_get_string(sval);
- gint64 val = g_strtod(str, NULL);
+ gint64 val = g_strtod(str, &end);
+ if (*end)
+ val = ~0L>>1;
g_value_set_int64(ival, val);
}
g_value_set_int64(ival, val);
}