From: Jerome St-Louis Date: Sat, 19 Oct 2013 05:41:06 +0000 (-0400) Subject: ecere/gfx/Bitmap: Fixed loading from file at current position X-Git-Tag: 0.44.09.9~168 X-Git-Url: https://ecere.com/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=88549f7c57bbd3facce7d5bc9e636304d333403b;p=sdk ecere/gfx/Bitmap: Fixed loading from file at current position - Previously broken by 61f70093a82be11336467c6e3f177f1c911fa50d - Acovel relied on this behavior to load pictures from ID3 tags --- diff --git a/ecere/src/gfx/Bitmap.ec b/ecere/src/gfx/Bitmap.ec index fc0973e..da4aa03 100644 --- a/ecere/src/gfx/Bitmap.ec +++ b/ecere/src/gfx/Bitmap.ec @@ -472,6 +472,7 @@ public: { subclass(BitmapFormat) format = null; int typeToTry = -1; + uintsize pos = file.Tell(); if(type) format = FindFormat(type); @@ -481,7 +482,7 @@ public: for(; typeToTry < NUM_TYPES_TO_TRY; typeToTry++) { - file.Seek(0, start); + file.Seek(pos, start); if(typeToTry >= 0) format = FindFormat(typesToTry[typeToTry]);