Commit 81bb3237 authored by Michael Natterer's avatar Michael Natterer 😴

libgimpconfig: add weird hack to gimp_scanner_parse_float()

because for whatever reason, writing

*dest = -scanner->value.v_int;

fails and writes some positive value instead.
parent b444954d
Pipeline #105727 passed with stages
in 18 minutes and 51 seconds
......@@ -620,12 +620,22 @@ gimp_scanner_parse_float (GimpScanner *scanner,
}
else if (g_scanner_peek_next_token (scanner) == G_TOKEN_INT)
{
/* use a temp value because for whatever reason writing
*
* *dest = -scanner->value.v_int;
*
* fails.
*/
gint64 int_value;
g_scanner_get_next_token (scanner);
if (negate)
*dest = -scanner->value.v_int;
int_value = -scanner->value.v_int;
else
*dest = scanner->value.v_int;
int_value = scanner->value.v_int;
*dest = int_value;
return TRUE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment