From owner-freebsd-current Sun Feb 26 12:40:51 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id MAA03702 for current-outgoing; Sun, 26 Feb 1995 12:40:51 -0800 Received: from gvr.win.tue.nl (root@gvr.win.tue.nl [131.155.210.19]) by freefall.cdrom.com (8.6.9/8.6.6) with ESMTP id MAA03696 for ; Sun, 26 Feb 1995 12:40:47 -0800 Received: by gvr.win.tue.nl (8.6.10/1.53) id VAA01283; Sun, 26 Feb 1995 21:40:00 +0100 From: guido@gvr.win.tue.nl (Guido van Rooij) Message-Id: <199502262040.VAA01283@gvr.win.tue.nl> Subject: broken sh behaviour (*with* patch) To: current@FreeBSD.org Date: Sun, 26 Feb 1995 21:40:00 +0100 (MET) X-Mailer: ELM [version 2.4 PL24] Content-Type: text Content-Length: 349 Sender: current-owner@FreeBSD.org Precedence: bulk While we're at it, here is the patch ;-) -Guido --- /usr/src/bin/sh/expand.c.orig Sat Sep 24 04:57:34 1994 +++ /usr/src/bin/sh/expand.c Sun Feb 26 21:06:38 1995 @@ -402,8 +402,10 @@ STPUTC(lastc, dest); } } - if (lastc == '\n') { + p--; + while (lastc == '\n') { STUNPUTC(dest); + lastc = *--p; } if (in.fd >= 0) close(in.fd);