diff options
author | ubq323 <ubq323@ubq323.website> | 2022-08-05 16:52:56 +0100 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2022-08-05 16:52:56 +0100 |
commit | 2a14a8ba3d97562919f585383db0dc800636fe5a (patch) | |
tree | a4d7682cc96da2edda4a7da2845dececc6281760 /img/load_pnm.lua | |
parent | 690fa76a7bc1fa87fecd186a3aca70a562c72b47 (diff) |
fix whitespaceness
Diffstat (limited to 'img/load_pnm.lua')
-rw-r--r-- | img/load_pnm.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/img/load_pnm.lua b/img/load_pnm.lua index 1fd4b70..af866ee 100644 --- a/img/load_pnm.lua +++ b/img/load_pnm.lua @@ -79,14 +79,14 @@ local function parse(imgf) local has_depth = not(typech == 1 or typech == 4) - local width,height,cur = imgf:match("%s*(%d+)%s*(%d+)%s*()",3) + local width,height,cur = imgf:match("\x0a(%d+) (%d+)\x0a()",3) width,height = tonumber(width),tonumber(height) assert(width,"couldn't find image dimensions") -- by 'depth' i mean 'maximum value' local depth = 1 if has_depth then - local ndepth,ncur = imgf:match("(%d+)%s*()",cur) + local ndepth,ncur = imgf:match("(%d+)\x0a()",cur) ndepth=tonumber(ndepth) assert(ndepth,"couldn't find image depth (max pixel value), in a format that needs it") depth=ndepth |