projects
/
xmake.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
66d0f98
)
Possible bug fix
author
Robert Pengelly
<robertapengelly@hotmail.com>
Sat, 18 Oct 2025 03:58:48 +0000
(
04:58
+0100)
committer
Robert Pengelly
<robertapengelly@hotmail.com>
Sat, 18 Oct 2025 03:58:48 +0000
(
04:58
+0100)
xmake.c
patch
|
blob
|
history
diff --git
a/xmake.c
b/xmake.c
index c80ce7b0dfa0f2441d3069db1e53b8f74d5d34e8..028ee4789230ecb483eb6bacb30224d41730c14e 100644
(file)
--- a/
xmake.c
+++ b/
xmake.c
@@
-1258,16
+1258,23
@@
int main (int argc, char **argv) {
unsigned long len;
- for (i = 0;
makeflags
[i]; i++) {
+ for (i = 0;
ptr
[i]; i++) {
- if (isspace ((int)
makeflags
[i])) {
+ if (isspace ((int)
ptr
[i])) {
argc++;
}
}
argv = xmalloc (sizeof (*argv) * (argc + 1));
- i = 0;
+
+ for (i = 0; ; i++) {
+
+ if (!isspace ((int) ptr[i])) {
+ break;
+ }
+
+ }
argv[1] = ptr + i;
argc = 1;
@@
-1341,6
+1348,8
@@
int main (int argc, char **argv) {
argv[argc] = 0;
parse_args (argv, argc);
+
+ free (argv);
}