From: Lutz M. <lu...@us...> - 2004-09-07 06:34:03
|
Update of /cvsroot/libexif/libexif/libexif/canon In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14941/libexif/canon Modified Files: mnote-canon-tag.c Log Message: 2004-09-07 Lutz Mueller <lu...@us...> * libexif/olympus * libexif/pentax * libexif/canon: Correctly return names, titles and descriptions of tages. Pointed out by Angela Wrobel. Index: mnote-canon-tag.c =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/canon/mnote-canon-tag.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- mnote-canon-tag.c 26 Oct 2003 10:06:17 -0000 1.1 +++ mnote-canon-tag.c 7 Sep 2004 06:33:54 -0000 1.2 @@ -47,7 +47,8 @@ { unsigned int i; - for (i = 0; table[i].name; i++) if (table[i].tag == t) break; + for (i = 0; i < sizeof (table) / sizeof (table[0]); i++) + if (table[i].tag == t) break; return (_(table[i].name)); } @@ -57,7 +58,8 @@ unsigned int i; bindtextdomain (GETTEXT_PACKAGE, LIBMNOTE_LOCALEDIR); - for (i = 0; table[i].title; i++) if (table[i].tag == t) break; + for (i = 0; i < sizeof (table) / sizeof (table[0]); i++) + if (table[i].tag == t) break; return (_(table[i].title)); } @@ -67,6 +69,7 @@ unsigned int i; bindtextdomain (GETTEXT_PACKAGE, LIBMNOTE_LOCALEDIR); - for (i = 0; table[i].description; i++) if (table[i].tag == t) break; + for (i = 0; i < sizeof (table) / sizeof (table[0]); i++) + if (table[i].tag == t) break; return (_(table[i].description)); } |