# HG changeset patch # User Matti Hamalainen # Date 1687167858 -10800 # Node ID 0ea16a3777b8aa9ef4d1fff7e8e1888805739cea # Parent 9dece4d00e30990581acebcda65d964369fad6f9 Improve error messages. diff -r 9dece4d00e30 -r 0ea16a3777b8 mgtool.php --- a/mgtool.php Mon Jun 19 12:44:04 2023 +0300 +++ b/mgtool.php Mon Jun 19 12:44:18 2023 +0300 @@ -341,14 +341,14 @@ { // Skip other chunks if (fseek($fh, $chunk["size"], SEEK_CUR) < 0) - return "File seek error in chunk skip"; + return "File seek error in chunk data skip"; } // If the chunk size is not aligned, skip one byte if ($chunk["size"] & 1) { if (fseek($fh, 1, SEEK_CUR) < 0) - return "File seek error in chunk skip"; + return "File seek error in chunk alignment skip"; } } @@ -653,6 +653,7 @@ $captions[$m[2]] = ["caption" => $m[3]]; else $hasData = preg_match("/^([#%]?)\s*(\S+?)$/", $str, $m); + if ($hasData) { $captions[$m[2]] = [