Skip to content

Commit f42ffe1

Browse files
authored
Fix sample basic intToStr was called with wrong length (#2876)
Reported in #2874.
1 parent 0b332d8 commit f42ffe1

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

RELEASE_NOTES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@
7070
- Fix fast-jit accessing shared memory's fields issue (#2841)
7171
- Fix wasm loader handle op_br_table and op_drop (#2864)
7272
- Fix block with type issue in fast interp (#2866)
73+
- Fix float argument handling for riscv32 ilp32d (#2871)
74+
- Portably handle fd_advise on directory fd (#2875)
75+
- Fix sample basic intToStr was called with wrong length (#2876)
7376

7477
### Enhancements
7578
- Implement strict validation of thread IDs according to the specification (#2521)
@@ -127,6 +130,7 @@
127130
- Use wasm_config_t to pass private configuration to wasm_engine_new (#2837)
128131
- core/iwasm/interpreter/wasm_loader.c: remove an extra validation (#2845)
129132
- Don't add "+d" to riscv cpu features if already given (#2855)
133+
- Fix compilation warnings on Windows (#2868)
130134

131135
### Others
132136
- Add mutex stress test (#2472)

samples/basic/wasm-apps/testapp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ float_to_string(float n, char *res, int res_size, int afterpoint)
5858
// is needed to handle cases like 233.007
5959
fpart = fpart * get_pow(10, afterpoint);
6060

61-
intToStr((int)fpart, res + i + 1, sizeof(res + i + 1), afterpoint);
61+
intToStr((int)fpart, res + i + 1, res_size - i - 1, afterpoint);
6262
}
6363
}
6464

0 commit comments

Comments
 (0)