This website works better with JavaScript.
Home
Help
Sign In
cacalabs
/
libcaca
mirror of
https://github.com/cacalabs/libcaca.git
Watch
1
Star
0
Fork
0
Code
Issues
0
Releases
7
Wiki
Activity
Browse Source
Fix handling of zero sized image in img2txt
Fixes
https://github.com/cacalabs/libcaca/issues/65
main
Pascal Terjan
4 months ago
parent
1a818d4c2d
commit
3b3a90112e
1 changed files
with
7 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+7
-0
src/img2txt.c
+ 7
- 0
src/img2txt.c
View File
@@ -176,6 +176,13 @@ int main(int argc, char **argv)
return 1;
}
if(!i->w || !i->h)
{
fprintf(stderr, "%s: image %s has invalid dimensions %ldx%ld\n", argv[0], argv[argc-1], i->w, i->h);
caca_free_canvas(cv);
return 1;
}
/* Assume a 6×10 font */
if(!cols && !lines)
{
Write
Preview
Loading…
Cancel
Save