Displaying 1 result from an estimated 1 matches for "allow_negative".
2007 Oct 11
0
2 commits - libswfdec/swfdec_text_format.c libswfdec/swfdec_xml.c libswfdec/swfdec_xml.h
...c/swfdec_text_format.c
+++ b/libswfdec/swfdec_text_format.c
@@ -212,7 +212,10 @@ swfdec_text_format_value_to_integer (Swf
return -2147483648;
} else {
if (is_unsigned) {
- return (unsigned)d;
+ if (!isfinite (d))
+ return 0;
+ else
+ return (unsigned)d;
} else {
if (!allow_negative && (int)d < 0) {
return 0;
@@ -223,7 +226,10 @@ swfdec_text_format_value_to_integer (Swf
}
} else {
if (is_unsigned) {
- return (unsigned)n;
+ if (!isfinite (d))
+ return 0;
+ else
+ return (unsigned)n;
} else {
if (!allow_negative && n...