Fix crash on Android export
Caused by a zero-length command-line segment. Fixes #14343.
This commit is contained in:
parent
c68300b88d
commit
9e9db55cb8
1 changed files with 7 additions and 4 deletions
|
@ -1557,12 +1557,15 @@ public:
|
|||
encode_uint32(cl.size(), &clf[0]);
|
||||
for (int i = 0; i < cl.size(); i++) {
|
||||
|
||||
print_line(itos(i) + " param: " + cl[i]);
|
||||
CharString txt = cl[i].utf8();
|
||||
int base = clf.size();
|
||||
clf.resize(base + 4 + txt.length());
|
||||
encode_uint32(txt.length(), &clf[base]);
|
||||
copymem(&clf[base + 4], txt.ptr(), txt.length());
|
||||
print_line(itos(i) + " param: " + cl[i]);
|
||||
int length = txt.length();
|
||||
if (!length)
|
||||
continue;
|
||||
clf.resize(base + 4 + length);
|
||||
encode_uint32(length, &clf[base]);
|
||||
copymem(&clf[base + 4], txt.ptr(), length);
|
||||
}
|
||||
|
||||
zip_fileinfo zipfi = get_zip_fileinfo();
|
||||
|
|
Loading…
Reference in a new issue