ref: fc145e25fb17b0a94e9012334bd2c70cf3d8dd00
parent: 1af7a1aced139ad7c90a053241e46f2ea2aaa2b4
author: Ori Bernstein <[email protected]>
date: Sun Sep 22 12:25:46 EDT 2024
mq: correct scaling of size suffix
--- a/mq.c
+++ b/mq.c
@@ -521,10 +521,12 @@
a->ntail = strtol(n+5, &e, 0);
while(*e){
switch(*e++){
- case 'g': a->ntail *= 1024*1024*1024;
- case 'm': a->ntail *= 1024*1024;
- case 'k': a->ntail *= 1024;
- default: respond(r, "bad scale");
+ case 'g': a->ntail *= 1024*1024*1024; break;
+ case 'm': a->ntail *= 1024*1024; break;
+ case 'k': a->ntail *= 1024; break;
+ default:
+ respond(r, "bad scale");
+ return;
}
}
}