From 008c58c6ac1cdbe0fdb01ce79567b7f0e815b83a Mon Sep 17 00:00:00 2001 From: tobigun Date: Sat, 19 Jun 2010 16:36:25 +0000 Subject: Bugfix: do not call Inc() on PByteArray pointers. It will not increment by one byte, but by SizeOf(ByteArray) bytes which is some KB. As a result the pointer will point to an illegal memory address. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2549 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/base/UMusic.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/base/UMusic.pas') diff --git a/src/base/UMusic.pas b/src/base/UMusic.pas index 41d6e80c..ff0fad04 100644 --- a/src/base/UMusic.pas +++ b/src/base/UMusic.pas @@ -1006,7 +1006,7 @@ begin Sample[0] := Value; Sample[1] := Value; // increase to next frame - Inc(Buffer, FrameSize); + Inc(PByte(Buffer), FrameSize); end; end; -- cgit v1.2.3