Allow any variable-sized message
Signed-off-by: 0xf8 <0xf8.dev@proton.me>
This commit is contained in:
parent
41db7a8c12
commit
740fcb11c2
7
rbtext.c
7
rbtext.c
@ -59,7 +59,12 @@ int main(int argc, char **argv) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
char *text = (char *)malloc(1024 + 1);
|
||||
uint reqSize = 0;
|
||||
for (int i = 1; i < argc; i++) {
|
||||
reqSize += strlen(argv[i]);
|
||||
}
|
||||
|
||||
char *text = (char *)malloc(reqSize + argc);
|
||||
|
||||
// Adds all the arguments together with spaces seperating them
|
||||
for (int i = 1, j = 0; i < argc; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user