projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf83355
)
Fix a bug reported by junkio@cox.net involving the mode_chars index.
author
Manuel Novoa III
<mjn3@codepoet.org>
Thu, 14 Aug 2003 02:28:49 +0000
(
02:28
-0000)
committer
Manuel Novoa III
<mjn3@codepoet.org>
Thu, 14 Aug 2003 02:28:49 +0000
(
02:28
-0000)
libbb/mode_string.c
patch
|
blob
|
history
diff --git
a/libbb/mode_string.c
b/libbb/mode_string.c
index 8d4d736ef83c037a1ea857cd7658a12594c6eb96..83142ba8a25d2a5d47a5b4b42e25846bfef92078 100644
(file)
--- a/
libbb/mode_string.c
+++ b/
libbb/mode_string.c
@@
-20,6
+20,11
@@
*
*/
+/* Aug 13, 2003
+ * Fix a bug reported by junkio@cox.net involving the mode_chars index.
+ */
+
+
#include <assert.h>
#include <sys/stat.h>
@@
-119,7
+124,7
@@
const char *bb_mode_string(int mode)
} while (++j < 3);
++i;
if (mode & (010000 >> i)) {
- *p = mode_chars[3 +
k + (i >> 1
)];
+ *p = mode_chars[3 +
(k & 2) + (i == 3
)];
}
} while (i < 3);