fix setPhoto() photoSize not being updated
This commit is contained in:
parent
d71f3641e2
commit
b5b96a841c
1 changed files with 3 additions and 0 deletions
|
@ -737,6 +737,7 @@ bool RagePhoto::setPhoto(const char *data, uint32_t size, uint32_t bufferSize)
|
||||||
}
|
}
|
||||||
p_photoData = t_photoData;
|
p_photoData = t_photoData;
|
||||||
memcpy(p_photoData, data, size);
|
memcpy(p_photoData, data, size);
|
||||||
|
p_photoSize = size;
|
||||||
}
|
}
|
||||||
else if (p_photoSize < size) {
|
else if (p_photoSize < size) {
|
||||||
free(p_photoData);
|
free(p_photoData);
|
||||||
|
@ -747,6 +748,7 @@ bool RagePhoto::setPhoto(const char *data, uint32_t size, uint32_t bufferSize)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
memcpy(p_photoData, data, size);
|
memcpy(p_photoData, data, size);
|
||||||
|
p_photoSize = size;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
memcpy(p_photoData, data, size);
|
memcpy(p_photoData, data, size);
|
||||||
|
@ -760,6 +762,7 @@ bool RagePhoto::setPhoto(const char *data, uint32_t size, uint32_t bufferSize)
|
||||||
}
|
}
|
||||||
memcpy(p_photoData, data, size);
|
memcpy(p_photoData, data, size);
|
||||||
p_photoLoaded = true;
|
p_photoLoaded = true;
|
||||||
|
p_photoSize = size;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bufferSize != 0) {
|
if (bufferSize != 0) {
|
||||||
|
|
Loading…
Reference in a new issue