Module Name:    src
Committed By:   dsl
Date:           Sat Aug 22 21:19:41 UTC 2009

Modified Files:
        src/usr.bin/sort: fields.c

Log Message:
Only process each number digit once.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/usr.bin/sort/fields.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/sort/fields.c
diff -u src/usr.bin/sort/fields.c:1.25 src/usr.bin/sort/fields.c:1.26
--- src/usr.bin/sort/fields.c:1.25	Sat Aug 22 10:53:28 2009
+++ src/usr.bin/sort/fields.c	Sat Aug 22 21:19:40 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: fields.c,v 1.25 2009/08/22 10:53:28 dsl Exp $	*/
+/*	$NetBSD: fields.c,v 1.26 2009/08/22 21:19:40 dsl Exp $	*/
 
 /*-
  * Copyright (c) 2000-2003 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
 #include "sort.h"
 
 #ifndef lint
-__RCSID("$NetBSD: fields.c,v 1.25 2009/08/22 10:53:28 dsl Exp $");
+__RCSID("$NetBSD: fields.c,v 1.26 2009/08/22 21:19:40 dsl Exp $");
 __SCCSID("@(#)fields.c	8.1 (Berkeley) 6/6/93");
 #endif /* not lint */
 
@@ -335,7 +335,7 @@
 	for (last_nz_pos = pos; line < lineend; ) {
 		if (pos >= bufend)
 			return NULL;
-		ch = *line;
+		ch = *line++;
 		val = (ch - '0') * 10;
 		if (val > 90) {
 			if (ch == DECIMAL_POINT && !had_dp) {

Reply via email to