aboutsummaryrefslogtreecommitdiffstats
path: root/g-ir-extract-deps.c
diff options
context:
space:
mode:
Diffstat (limited to 'g-ir-extract-deps.c')
-rw-r--r--g-ir-extract-deps.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/g-ir-extract-deps.c b/g-ir-extract-deps.c
index 1c1735d..f0cf725 100644
--- a/g-ir-extract-deps.c
+++ b/g-ir-extract-deps.c
@@ -52,17 +52,21 @@ int main(int argc, char ** argv)
fprintf(stderr, "failed to read deps offset from typelib\n");
exit(1);
}
- fseek(typelib, deps_offset, SEEK_SET);
- if (fscanf(typelib, "%8191s", deps) < 1)
+ if (deps_offset > 0)
{
- fprintf(stderr, "failed to read deps from typelib\n");
- exit(1);
- }
+ fseek(typelib, deps_offset, SEEK_SET);
+ if (fscanf(typelib, "%8191s", deps) < 1)
+ {
+ fprintf(stderr, "failed to read deps from typelib\n");
+ exit(1);
+ }
+ printf("%s\n", deps);
+ }
+
free(deps);
free(magic);
fclose(typelib);
- printf("%s\n", deps);
return 0;
}