Преглед изворни кода

Fixes EOF error, not sure if it's good solution

rsredsq пре 10 година
родитељ
комит
89c8584cd1
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      Source/AtomicJS/Javascript/JSRequire.cpp

+ 3 - 0
Source/AtomicJS/Javascript/JSRequire.cpp

@@ -133,6 +133,9 @@ namespace Atomic
             vm->SetLastModuleSearchFile(jsfile->GetFullPath());
             String source;
             jsfile->ReadText(source);
+            //not sure if it's good solution
+            source.At(source.Length() - 1) = ' ';
+            source.Append("\n");
             duk_push_string(ctx, source.CString());
             return 1;
         }