Nasal: fix valgrind error in print/logprint
Requires matching Simgear change.
This commit is contained in:
parent
2f4b2153ef
commit
ae094f9a77
1 changed files with 2 additions and 2 deletions
|
@ -547,7 +547,7 @@ static naRef f_print(naContext c, naRef me, int argc, naRef* args)
|
||||||
file = naStr_data(naGetSourceFile(c, frame));
|
file = naStr_data(naGetSourceFile(c, frame));
|
||||||
}
|
}
|
||||||
int line = naGetLine(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 {
|
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
|
// use the nasal source file and line for the message location, since
|
||||||
// that's more useful than the location here!
|
// 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)),
|
naStr_data(naGetSourceFile(c, 0)),
|
||||||
naGetLine(c, 0), buf);
|
naGetLine(c, 0), buf);
|
||||||
return naNum(buf.length());
|
return naNum(buf.length());
|
||||||
|
|
Loading…
Add table
Reference in a new issue