elf: fix regression with empty strings
authorLucas De Marchi <lucas.demarchi@profusion.mobi>
Tue, 20 Dec 2011 14:04:21 +0000 (12:04 -0200)
committerLucas De Marchi <lucas.demarchi@profusion.mobi>
Tue, 20 Dec 2011 14:04:21 +0000 (12:04 -0200)
commit76b8031bce288a4052cea5e9fb7cfb7ccde9ca3e
treed0a52a02f2210bd51a88fffd42ec0870ad79463d
parent51c409b449a82283515e7c3fa5a4a0e2f23807fe
elf: fix regression with empty strings

Commit "b20dc17 Remove unneeded reference to last string" reverted the
fix in "47a0ef6 elf: do not output empty strings." and empty strings are
appearing again in kmod-modinfo.

With this commit we do a bit different and instead of keeping the
reference to last string we skip the '\0' inside the loop.
libkmod/libkmod-elf.c