diff --git a/LibC/stdlib.cpp b/LibC/stdlib.cpp index 7acc5455c9..4a41e5be44 100644 --- a/LibC/stdlib.cpp +++ b/LibC/stdlib.cpp @@ -363,7 +363,7 @@ long strtol(const char* str, char** endptr, int base) num += (track *= base) / base * digit_value; } else { if (endptr != NULL) - *endptr = estr; + *endptr = const_cast(estr); return 0; }; estr--;