diff options
author | Eugene Sandulenko | 2019-08-08 00:32:43 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:32 +0200 |
commit | b89f14360b2d4aadaf153624c0e2eca53140773d (patch) | |
tree | 2897a80ac0e6b4d59e381f059aea0968837b7118 | |
parent | 5a0305bb9a5b1e1a57f2c648101312e2935992a8 (diff) | |
download | scummvm-rg350-b89f14360b2d4aadaf153624c0e2eca53140773d.tar.gz scummvm-rg350-b89f14360b2d4aadaf153624c0e2eca53140773d.tar.bz2 scummvm-rg350-b89f14360b2d4aadaf153624c0e2eca53140773d.zip |
HDB: Fix crash in gfx loading
-rw-r--r-- | engines/hdb/gfx.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/hdb/gfx.cpp b/engines/hdb/gfx.cpp index 217d6bb6f2..8805da01d7 100644 --- a/engines/hdb/gfx.cpp +++ b/engines/hdb/gfx.cpp @@ -815,7 +815,7 @@ bool Gfx::loadFont(const char *string) { for (int x = 0; x < cInfo->width; x++) { int u, v; u = y; - v = _fontHeader.height - x - 1; + v = cInfo->width - x - 1; ptr = (uint16 *)_fontSurfaces[i].getBasePtr(u, v); *ptr = memoryStream.readUint16LE(); } @@ -1192,7 +1192,7 @@ Graphics::Surface Picture::load(Common::SeekableReadStream *stream) { for (int y = 0; y < _height; y++) { for (int x = 0; x < _width; x++) { int u = y; - int v = _height - x - 1; + int v = _width - x - 1; uint16 *ptr = (uint16 *)_surface.getBasePtr(u, v); *ptr = stream->readUint16LE(); } |