Copy from array to bank

BlitzMax Forums/BlitzMax Programming/Copy from array to bank

DH(Posted 2009) [#1]
Local myData:byte[] = ( a bunch of bytes)
	Local dataSize:int = 20 'number of bytes relevant
	Local bufferPtr: Byte Ptr = Varptr buffer[ 4 ] 'I want to start at the 4th byte in
	MemCopy( BankBuf( mybank ), bufferPtr, dataSize - 4 )


This seems logically correct to me (from what I gather from the documents), but it doesn't work (the data in the bank when i iterate through the bytes is corrupt). The bank is the correct size for the data it is to receive. Essentially I have a few bytes in the middle of my buffer (myData) I wanted stuck into a bank.

Can someone correct my method here? Thanks in advance!


DH(Posted 2009) [#2]
nvm, found my problem, stupid typo in another file... bleh heh
Sorry!