sanity check in get_shader_info_log

In get_shader_info_log and get_program_info_log, if opengl returns 0 for a result_len it will overflow causing result.truncate to fail!().