Ecere Software
/
sdk
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
017547a
)
ecere/gfx/Bitmap: Fixed loading from file at current position
author
Jerome St-Louis
<jerome@ecere.com>
Sat, 19 Oct 2013 05:41:06 +0000
(
01:41
-0400)
committer
Jerome St-Louis
<jerome@ecere.com>
Sat, 19 Oct 2013 05:41:06 +0000
(
01:41
-0400)
- Previously broken by
61f70093a82be11336467c6e3f177f1c911fa50d
- Acovel relied on this behavior to load pictures from ID3 tags
ecere/src/gfx/Bitmap.ec
patch
|
blob
|
history
diff --git
a/ecere/src/gfx/Bitmap.ec
b/ecere/src/gfx/Bitmap.ec
index
fc0973e
..
da4aa03
100644
(file)
--- 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]);