Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/sort Fix generation of unmasked alpha keys.



details:   https://anonhg.NetBSD.org/src/rev/a3076f23cd1b
branches:  trunk
changeset: 746893:a3076f23cd1b
user:      dsl <dsl%NetBSD.org@localhost>
date:      Sat Aug 22 21:28:55 2009 +0000

description:
Fix generation of unmasked alpha keys.

diffstat:

 usr.bin/sort/fields.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 6cea5401f0d5 -r a3076f23cd1b usr.bin/sort/fields.c
--- a/usr.bin/sort/fields.c     Sat Aug 22 21:19:40 2009 +0000
+++ b/usr.bin/sort/fields.c     Sat Aug 22 21:28:55 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fields.c,v 1.26 2009/08/22 21:19:40 dsl Exp $  */
+/*     $NetBSD: fields.c,v 1.27 2009/08/22 21:28:55 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.26 2009/08/22 21:19:40 dsl Exp $");
+__RCSID("$NetBSD: fields.c,v 1.27 2009/08/22 21:28:55 dsl Exp $");
 __SCCSID("@(#)fields.c 8.1 (Berkeley) 6/6/93");
 #endif /* not lint */
 
@@ -205,7 +205,7 @@
        mask = cur_fld->mask;
        lweight = cur_fld->weights;     
        for (; start < end; start++) {
-               if (mask && mask[*start]) {
+               if (!mask || mask[*start]) {
                        *tablepos++ = lweight[*start];
                }
        }



Home | Main Index | Thread Index | Old Index