1
0
Fork 0

Nasal: fix valgrind error in print/logprint

Requires matching Simgear change.
This commit is contained in:
James Turner 2020-07-17 12:03:28 +01:00
parent 2f4b2153ef
commit ae094f9a77

View file

@ -547,7 +547,7 @@ static naRef f_print(naContext c, naRef me, int argc, naRef* args)
file = naStr_data(naGetSourceFile(c, frame));
}
int line = naGetLine(c, frame);
sglog().log(SG_NASAL, SG_ALERT, file, line, buf);
sglog().logCopyingFilename(SG_NASAL, SG_ALERT, file, line, buf);
}
}
else {
@ -574,7 +574,7 @@ static naRef f_logprint(naContext c, naRef me, int argc, naRef* args)
}
// use the nasal source file and line for the message location, since
// that's more useful than the location here!
sglog().log(SG_NASAL, (sgDebugPriority)(int) priority.num,
sglog().logCopyingFilename(SG_NASAL, (sgDebugPriority)(int) priority.num,
naStr_data(naGetSourceFile(c, 0)),
naGetLine(c, 0), buf);
return naNum(buf.length());