Index: src/allocation.cc |
diff --git a/src/allocation.cc b/src/allocation.cc |
index 41724b68cfb71d37190ceb26f085ab6a064b216e..678f4fd7d2f23495d1ed76adc03a0a17f07dc369 100644 |
--- a/src/allocation.cc |
+++ b/src/allocation.cc |
@@ -80,7 +80,7 @@ void AllStatic::operator delete(void* p) { |
char* StrDup(const char* str) { |
- int length = strlen(str); |
+ int length = StrLength(str); |
char* result = NewArray<char>(length + 1); |
memcpy(result, str, length * kCharSize); |
result[length] = '\0'; |
@@ -88,8 +88,8 @@ char* StrDup(const char* str) { |
} |
-char* StrNDup(const char* str, size_t n) { |
- size_t length = strlen(str); |
+char* StrNDup(const char* str, int n) { |
+ int length = StrLength(str); |
if (n < length) length = n; |
char* result = NewArray<char>(length + 1); |
memcpy(result, str, length * kCharSize); |