forked from enlightenment/efl
eolian: fix potential ABI violation in expr serialization
While this may seem safe, and likely is on any 64-bit system, it may not be entirely well defined. And in this case we should not have to worry about copying. Maybe fixes T8276...
This commit is contained in:
parent
5ac1f52af9
commit
27291b4486
|
@ -152,8 +152,10 @@ _expr_serialize(const Eolian_Expression *expr, Eina_Strbuf *buf, Eina_Bool outer
|
||||||
case EOLIAN_EXPR_STRING:
|
case EOLIAN_EXPR_STRING:
|
||||||
case EOLIAN_EXPR_CHAR:
|
case EOLIAN_EXPR_CHAR:
|
||||||
{
|
{
|
||||||
Eolian_Value *v = (Eolian_Value*)&expr->type;
|
Eolian_Value v;
|
||||||
const char *x = eolian_expression_value_to_literal(v);
|
v.type = expr->type;
|
||||||
|
v.value = expr->value;
|
||||||
|
const char *x = eolian_expression_value_to_literal(&v);
|
||||||
if (!x)
|
if (!x)
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
eina_strbuf_append(buf, x);
|
eina_strbuf_append(buf, x);
|
||||||
|
|
Loading…
Reference in New Issue