[695] in BarnOwl Developers

home help back first fref pref prev next nref lref last post

[D-O-H] r758 - trunk/owl

daemon@ATHENA.MIT.EDU (nelhage@MIT.EDU)
Thu Oct 29 18:08:45 2009

Resent-From: nelhage@mit.edu
Resent-To: barnowl-dev-mtg@charon.mit.edu
To: dirty-owl-hackers@mit.edu
From: nelhage@MIT.EDU
Reply-to: dirty-owl-hackers@MIT.EDU
Date: Mon, 27 Aug 2007 19:17:21 -0400 (EDT)

Author: nelhage
Date: 2007-08-27 19:17:20 -0400 (Mon, 27 Aug 2007)
New Revision: 758

Modified:
   trunk/owl/util.c
Log:
Don't read before the start of the string for an instance


Modified: trunk/owl/util.c
===================================================================
--- trunk/owl/util.c	2007-08-17 21:26:44 UTC (rev 757)
+++ trunk/owl/util.c	2007-08-27 23:17:20 UTC (rev 758)
@@ -767,7 +767,7 @@
 
   start = owl_strdup(start);
   end = start + strlen(start) - 1;
-  while(*end == 'd' && *(end-1) == '.') {
+  while(end > start && *end == 'd' && *(end-1) == '.') {
     end -= 2;
   }
   *(end + 1) = 0;


home help back first fref pref prev next nref lref last post