From 1a009fd877364f5c6616a381d39e33902201a298 Mon Sep 17 00:00:00 2001 From: timb Date: Sat, 18 Jul 2015 12:50:53 -0700 Subject: return incomplete string rather than nothing --- js/png.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'js/png.js') diff --git a/js/png.js b/js/png.js index 3c165dc..df9960c 100644 --- a/js/png.js +++ b/js/png.js @@ -173,7 +173,8 @@ var read_cstring = function(u8, pos){ if (u8[pos] === 0) return str str += String.fromCharCode(u8[pos]) pos++ - } + } + return str } var decode_itxt_chunk = function(chunk){ -- cgit v1.2.3-70-g09d2