Merge pull request #3229 from assimp/qarmin-added_check_before_using
Qarmin added check before usingpull/3214/head^2
commit
9566284873
|
@ -145,13 +145,13 @@ bool ParseDataURI(const char *const_uri, size_t uriLen, DataURI &out) {
|
||||||
size_t i = 5, j;
|
size_t i = 5, j;
|
||||||
if (uri[i] != ';' && uri[i] != ',') { // has media type?
|
if (uri[i] != ';' && uri[i] != ',') { // has media type?
|
||||||
uri[1] = char(i);
|
uri[1] = char(i);
|
||||||
for (; uri[i] != ';' && uri[i] != ',' && i < uriLen; ++i) {
|
for (;i < uriLen && uri[i] != ';' && uri[i] != ','; ++i) {
|
||||||
// nothing to do!
|
// nothing to do!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while (uri[i] == ';' && i < uriLen) {
|
while (i < uriLen && uri[i] == ';') {
|
||||||
uri[i++] = '\0';
|
uri[i++] = '\0';
|
||||||
for (j = i; uri[i] != ';' && uri[i] != ',' && i < uriLen; ++i) {
|
for (j = i; i < uriLen && uri[i] != ';' && uri[i] != ','; ++i) {
|
||||||
// nothing to do!
|
// nothing to do!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue