svn commit: trunk/busybox: editors libbb
vda at busybox.net
vda at busybox.net
Thu Jun 26 22:40:03 UTC 2008
Author: vda
Date: 2008-06-26 15:40:02 -0700 (Thu, 26 Jun 2008)
New Revision: 22522
Log:
print_flags: fix trivial thinko
vi: fix reversed checks for underflow
Modified:
trunk/busybox/editors/vi.c
trunk/busybox/libbb/print_flags.c
Changeset:
Modified: trunk/busybox/editors/vi.c
===================================================================
--- trunk/busybox/editors/vi.c 2008-06-26 20:27:42 UTC (rev 22521)
+++ trunk/busybox/editors/vi.c 2008-06-26 22:40:02 UTC (rev 22522)
@@ -1659,12 +1659,12 @@
cmdcnt = 0;
end_cmd_q(); // stop adding to q
last_status_cksum = 0; // force status update
- if ((p[-1] != '\n') && (dot > text)) {
+ if ((p > text) && (p[-1] != '\n')) {
p--;
}
} else if (c == erase_char || c == 8 || c == 127) { // Is this a BS
// 123456789
- if ((p[-1] != '\n') && (dot>text)) {
+ if ((p > text) && (p[-1] != '\n')) {
p--;
p = text_hole_delete(p, p); // shrink buffer 1 char
}
Modified: trunk/busybox/libbb/print_flags.c
===================================================================
--- trunk/busybox/libbb/print_flags.c 2008-06-26 20:27:42 UTC (rev 22521)
+++ trunk/busybox/libbb/print_flags.c 2008-06-26 22:40:02 UTC (rev 22522)
@@ -19,8 +19,8 @@
labels);
need_separator = separator;
flags &= ~ *masks;
- masks++;
}
+ masks++;
labels += strlen(labels) + 1;
}
return flags;
More information about the busybox-cvs
mailing list