Skip to content
Snippets Groups Projects
Commit 3791c4c6 authored by Arnaud Blanchard's avatar Arnaud Blanchard
Browse files

Exit when image number is finish. Remove a warning

parent 7d1163d9
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,7 @@ int check_or_update_blc_channel_name(char const**name){
pid_pos=strstr(*name, "<pid>");
if (pid_pos) {
asprintf(&new_name, "%.*s%d", (int)(pid_pos-*name), *name, getpid());
SYSTEM_ERROR_CHECK(asprintf(&new_name, "%.*s%d", (int)(pid_pos-*name), *name, getpid()), -1, "Allocating default image name");
*name=new_name;
}
......@@ -78,11 +78,13 @@ int main(int argc, char**argv){
BLC_COMMAND_LOOP(period){
//If we have a number of images to load and we have not finish
blc_image_update_with_png_file(&output, final_filename);
if (images_nb_str && image_id != images_nb-1) {
SPRINTF(final_filename, filename, image_id);
image_id++;
}
if (images_nb_str){
if ( image_id == images_nb-1) blc_command_ask_quit();
else {
SPRINTF(final_filename, filename, image_id);
image_id++;
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment