Closed
Description
Description:
The fix for #5045 in commit dd25e2b tries to fix an issue with multiple definitions for reverse in stdlib_noniso.c and esp_dsp.h. However this breaks some integer to string conversion functions, that use the reverse function, at least ultoa, as well as the String constructors using those functions.
Expected output is 123456 (twice), but 654321 is printed instead.
If I change the guard in line 33 to #if 1 it works as expected.
arduino-esp32/cores/esp32/stdlib_noniso.c
Lines 33 to 47 in 4ada3f5
Sketch:
void setup() {
// Wait for serial monitor to attach
delay(3000);
Serial.begin(115200);
// Using string constructor
String s = String(123456ul, 10);
Serial.println(s);
// Using ultoa directly
char buf[10] = {0};
ultoa(123456ul, buf, 10);
Serial.println(buf);
}
void loop() {}
Metadata
Metadata
Assignees
Labels
No labels