forked from enlightenment/efl
Eet: Fail gracefully on invalid input
Consider infinity and NaN as invalid input for put_float and put_double, since the underlying convert function can't process them. This fixes potential errors with incomplete / invalid evas 3d models
This commit is contained in:
parent
cda8ccf770
commit
bd32015dfc
|
@ -1018,7 +1018,8 @@ eet_data_put_float(Eet_Dictionary *ed,
|
||||||
char buf[128];
|
char buf[128];
|
||||||
int idx;
|
int idx;
|
||||||
|
|
||||||
eina_convert_dtoa((double)(*(float *)src), buf);
|
if (!eina_convert_dtoa((double)(*(float *)src), buf))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
if (!ed)
|
if (!ed)
|
||||||
{
|
{
|
||||||
|
@ -1094,7 +1095,8 @@ eet_data_put_double(Eet_Dictionary *ed,
|
||||||
char buf[128];
|
char buf[128];
|
||||||
int idx;
|
int idx;
|
||||||
|
|
||||||
eina_convert_dtoa((double)(*(double *)src), buf);
|
if (!eina_convert_dtoa((double)(*(double *)src), buf))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
if (!ed)
|
if (!ed)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue