From 99bd965b9984dcad5f2e5152621dfb7caea4b35b Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sun, 24 Aug 1997 04:03:53 +0000 Subject: [PATCH] Trim any trailing end-of-line from system-call error strings. --- v7/src/microcode/nttop.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/v7/src/microcode/nttop.c b/v7/src/microcode/nttop.c index 56c7aaf51..81004c9b0 100644 --- a/v7/src/microcode/nttop.c +++ b/v7/src/microcode/nttop.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: nttop.c,v 1.21 1997/06/26 07:05:11 cph Exp $ +$Id: nttop.c,v 1.22 1997/08/24 04:03:53 cph Exp $ Copyright (c) 1993-97 Massachusetts Institute of Technology @@ -302,6 +302,10 @@ w32_error_message (DWORD rc) if (c == '\0') break; } + if (((to - 3) >= result) + && ((to[-3]) == '\r') + && ((to[-2]) == '\n')) + (to[-3]) = '\0'; } (void) LocalFree (buffer); return (result); -- 2.25.1