Commit d6c285a5 authored by Robert Ancell's avatar Robert Ancell Committed by Bastien Nocera

io: Fix check if library is running inside build tree

The existing check was missing the length of the string so instead of reading
the end of the string it read the memory before it.
parent 3283a302
......@@ -350,7 +350,7 @@ correct_prefix (gchar **path)
strncmp (*path, GDK_PIXBUF_PREFIX "\\", strlen (GDK_PIXBUF_PREFIX "\\")) == 0)
gchar *tem = NULL;
if (strlen(*path) > 5 && strncmp (*path - 5, ".libs", 5) == 0)
if (g_str_has_suffix (*path, ".libs"))
/* We are being run from inside the build tree, and shouldn't mess about. */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment