Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!dimacs.rutgers.edu!mips!swrinde!elroy.jpl.nasa.gov!decwrl!pa.dec.com!src.dec.com!David Goldberg From: goldberg@parc.xerox.com (David Goldberg) Newsgroups: comp.lang.modula3 Subject: Re: STextTable bug? Message-ID: Date: 12 Jun 91 00:41:06 GMT References: <9106110204.AA07382@cs.Princeton.EDU> Lines: 30 In-Reply-To: <9106110204.AA07382@cs.Princeton.EDU> To: m3, Dave Hanson This bug has been addressed earlier: Date: Mon, 1 Apr 1991 18:00:12 PST From: muller@src.dec.com (Eric Muller) Subject: SRC-M3 1.6: bug in STextTable. To: modula3.parc@xerox.com Norman Ramsey and David Golberg reported that STextTable sometime fails with a runtime error in Text.Compare. The Text module now implements its interface properly, i.e. it complains when a NIL Text.T is passed to one of the Text routines. Unfortunately I failed to modify all the clients of Text so that they do not call Text.xxx with a NIL Text.T. Here is a version of STextTable.Compare that will do the right thing: PROCEDURE Compare (arg: REFANY; key1, key2: STable.Key): INTEGER = BEGIN IF key1 = NIL THEN key1 := ""; END; IF key2 = NIL THEN key2 := ""; END; RETURN Text.Compare (key1, key2) END Compare; Thanks to Norman and David for reporting this bug. -- Eric.