diff --git a/C/errors.c b/C/errors.c index 77decbe27..554fd2c15 100644 --- a/C/errors.c +++ b/C/errors.c @@ -363,8 +363,8 @@ Error (yap_error_number type, Term where, char *format,...) PrologMode &= ~AbortMode; PrologMode |= InErrorMode; } else { - plwrite( where, DebugPutc, 0); - where = CopyTerm(Deref(where)); + if (type != SYNTAX_ERROR) + where = CopyTerm(Deref(where)); if (IsVarTerm(where)) { /* we must be careful someone gave us a copy to a local variable */ Term t = MkVarTerm();