Move test and tweak code a bit.

This commit is contained in:
Bob Nystrom
2018-04-28 10:07:04 -07:00
parent 4d056b6ec3
commit d03ef9e8b0
2 changed files with 3 additions and 6 deletions

View File

@ -3420,12 +3420,9 @@ void definition(Compiler* compiler)
ObjFn* wrenCompile(WrenVM* vm, ObjModule* module, const char* source,
bool isExpression, bool printErrors)
{
// Skip potential UTF-8 BOM
if (strncmp(source, "\xEF\xBB\xBF", 3) == 0)
{
source += 3;
}
// Skip the UTF-8 BOM if there is one.
if (strncmp(source, "\xEF\xBB\xBF", 3) == 0) source += 3;
Parser parser;
parser.vm = vm;
parser.module = module;