Skip to content

Commit

Permalink
Fixed: [EEZ Flow] In String.Format function, format specifier %d resu…
Browse files Browse the repository at this point in the history
…lts in "Failed to evaluate ..." #643
  • Loading branch information
mvladic committed Nov 19, 2024
1 parent 7c2177f commit c4b97f3
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/project-editor/flow/runtime/cpp/eez-framework
Binary file modified packages/project-editor/flow/runtime/lvgl_runtime_v8.3.wasm
Binary file not shown.
Binary file modified packages/project-editor/flow/runtime/lvgl_runtime_v9.0.wasm
Binary file not shown.
3 changes: 2 additions & 1 deletion resources/eez-framework-amalgamation/eez-flow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9256,7 +9256,8 @@ void do_OPERATION_TYPE_STRING_FORMAT(EvalStack &stack) {
stack.push(Value::makeError());
return;
}
char result[1024];
//char result[1024];
char result[64];
if (type == type_int) snprintf(result, sizeof(result), format, (int)b.getInt());
else if (type == type_signed_char) snprintf(result, sizeof(result), format, (signed char)b.getInt32());
else if (type == type_short_int) snprintf(result, sizeof(result), format, (short int)b.getInt32());
Expand Down

0 comments on commit c4b97f3

Please sign in to comment.