We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 76ede4a commit 492f619Copy full SHA for 492f619
examples/llava/mtmd-cli.cpp
@@ -308,7 +308,11 @@ int main(int argc, char ** argv) {
308
}
309
g_is_generating = true;
310
if (line.find("/image") == 0) {
311
- std::string image = (line.size()>=7) ? line.substr(7) : "";
+ if (line.size() < 8) {
312
+ LOG_ERR("ERR: Missing image filename\n");
313
+ continue;
314
+ }
315
+ std::string image = line.substr(7);
316
images_fname.push_back(string_strip(image));
317
content += "<__image__>";
318
continue;
0 commit comments