@@ -539,7 +539,7 @@ void File::ReadText(String& text)
Read((void*)text.CString(), size_);
- text[size_] = '\n';
+ text[size_] = '\0';
}
// ATOMIC BEGIN
@@ -133,6 +133,7 @@ namespace Atomic
vm->SetLastModuleSearchFile(jsfile->GetFullPath());
String source;
jsfile->ReadText(source);
+ source.At(source.Length() - 1) = '\n';
duk_push_string(ctx, source.CString());
return 1;