Module Name: src
Committed By: dsl
Date: Sat Aug 22 21:28:55 UTC 2009
Modified Files:
src/usr.bin/sort: fields.c
Log Message:
Fix generation of unmasked alpha keys.
To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 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.26 src/usr.bin/sort/fields.c:1.27
--- src/usr.bin/sort/fields.c:1.26 Sat Aug 22 21:19:40 2009
+++ src/usr.bin/sort/fields.c Sat Aug 22 21:28:55 2009
@@ -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];
}
}