Avoid calling truncate with a invalid size if result_len is 0
Merge pull request #22 from csherratt/master

sanity check in get_shader_info_log