aboutsummaryrefslogtreecommitdiff
path: root/toys/other
diff options
context:
space:
mode:
Diffstat (limited to 'toys/other')
-rw-r--r--toys/other/makedevs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toys/other/makedevs.c b/toys/other/makedevs.c
index 0d20a57d..0f0a6615 100644
--- a/toys/other/makedevs.c
+++ b/toys/other/makedevs.c
@@ -84,8 +84,8 @@ void makedevs_main()
while (*node == '/') node++; // using relative path
for (i = 0; (!cnt && !i) || i < cnt; i++) {
- if (cnt) {
- snprintf(toybuf, sizeof(toybuf), "%s%u", node, st_val + i);
+ if (cnt>1) {
+ snprintf(toybuf, sizeof(toybuf), "%.999s%u", node, st_val + i);
ptr = toybuf;
} else ptr = node;