summaryrefslogtreecommitdiff
path: root/core/ustring.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/ustring.cpp')
-rw-r--r--core/ustring.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/core/ustring.cpp b/core/ustring.cpp
index 8d40f56386..3a0708851e 100644
--- a/core/ustring.cpp
+++ b/core/ustring.cpp
@@ -115,7 +115,7 @@ void String::copy_from(const char *p_cstr) {
resize(len + 1); // include 0
- CharType *dst = this->ptr();
+ CharType *dst = this->ptrw();
for (int i = 0; i < len + 1; i++) {
@@ -1119,7 +1119,7 @@ String String::num_int64(int64_t p_num, int base, bool capitalize_hex) {
chars++;
String s;
s.resize(chars + 1);
- CharType *c = s.ptr();
+ CharType *c = s.ptrw();
c[chars] = 0;
n = num;
do {
@@ -3380,8 +3380,6 @@ bool String::is_valid_float() const {
from++;
}
- //this was pulled out of my ass, i wonder if it's correct...
-
bool exponent_found = false;
bool period_found = false;
bool sign_found = false;