Skip to content
Permalink
Browse files Browse the repository at this point in the history
actually return empty stringand not 'em,pty string' as expected
  • Loading branch information
msmeissn committed Feb 25, 2021
1 parent f6334d9 commit eb84b0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion exif/actions.c
Expand Up @@ -661,7 +661,7 @@ escape_xml(const char *text)
char *out;
size_t len;

if (!strlen(text)) return "empty string";
if (!strlen(text)) return "";

for (out=escaped, len=0; *text; ++len, ++out, ++text) {
/* Make sure there's plenty of room for a quoted character */
Expand Down

3 comments on commit eb84b0e

@hughmcmaster
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@msmeissn, shouldn't that fix be if (!text || !*text) return "";?

@msmeissn
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are right, i will add a !text check.

@hughmcmaster
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I sent a MR for the change: #12

Please sign in to comment.