projects
/
fw
/
sdcc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed Z80 port - crt0.o: cannot open.
[fw/sdcc]
/
src
/
SDCCutil.c
diff --git
a/src/SDCCutil.c
b/src/SDCCutil.c
index 381d53d04380cc3d679027aa9bfa1e9206037951..c0c317bee6930677988f2e64babfec74885ed5aa 100644
(file)
--- a/
src/SDCCutil.c
+++ b/
src/SDCCutil.c
@@
-179,14
+179,22
@@
setMainValue (const char *pname, const char *pvalue)
}
void
}
void
-buildCmdLine2 (char *pbuffer,
const char *pcmd, size_t len
)
+buildCmdLine2 (char *pbuffer,
size_t len, const char *pcmd, ...
)
{
{
+ va_list ap;
char *poutcmd;
char *poutcmd;
+
assert(pbuffer && pcmd);
assert(_mainValues);
assert(pbuffer && pcmd);
assert(_mainValues);
- poutcmd = msprintf(_mainValues, pcmd);
+ va_start(ap, pcmd);
+
+ poutcmd = mvsprintf(_mainValues, pcmd, ap);
+
+ va_end(ap);
+
strncpyz(pbuffer, poutcmd, len);
strncpyz(pbuffer, poutcmd, len);
+ Safe_free(poutcmd);
}
void
}
void