mirror of https://github.com/axmolengine/axmol.git
fix crash in CCBReader::readFloat()
This commit is contained in:
parent
b5d3de0104
commit
3b6c46b478
|
@ -512,7 +512,7 @@ float CCBReader::readFloat() {
|
||||||
/* using a memcpy since the compiler isn't
|
/* using a memcpy since the compiler isn't
|
||||||
* doing the float ptr math correctly on device.
|
* doing the float ptr math correctly on device.
|
||||||
* TODO still applies in C++ ? */
|
* TODO still applies in C++ ? */
|
||||||
float * pF = (float*)(this->mBytes + this->mCurrentByte);
|
unsigned char* pF = (this->mBytes + this->mCurrentByte);
|
||||||
float f = 0;
|
float f = 0;
|
||||||
|
|
||||||
// N.B - in order to avoid an unaligned memory access crash on 'memcpy()' the the (void*) casts of the source and
|
// N.B - in order to avoid an unaligned memory access crash on 'memcpy()' the the (void*) casts of the source and
|
||||||
|
|
Loading…
Reference in New Issue