]> Nishi Git Mirror - gwion.git/commitdiff
:bug: Fix StringPlus
authorfennecdjay <astor.jeremie@wanadoo.fr>
Tue, 10 Sep 2019 20:49:11 +0000 (22:49 +0200)
committerfennecdjay <astor.jeremie@wanadoo.fr>
Tue, 10 Sep 2019 20:49:11 +0000 (22:49 +0200)
src/lib/string.c

index dd66025a14de59367d1ef655fc3edabb470cf2c8..fbf31cf007acd801c7323fb5f9c626eeb29de5d0 100644 (file)
@@ -145,7 +145,7 @@ static INSTR(name##String_Plus) {\
   push_string(shred, rhs, c);                       \
 }
 describe_string_plus(,SZ_INT, M_Object, release(lhs, shred),
-  strlen(STRING(rhs)), "%s", lhs ? STRING(lhs) : "")
+  lhs ? strlen(STRING(lhs)) : 0, "%s", lhs ? STRING(lhs) : "")
 describe_string_plus(Int_, SZ_INT, m_int,,
   num_digit((m_uint)lhs), "%"INT_F, lhs)
 describe_string_plus(Float_, SZ_FLOAT, m_float,,