mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-04-28 21:27:58 +03:00
size_t
This commit is contained in:
parent
1e5d1670c0
commit
012afde593
2 changed files with 4 additions and 4 deletions
|
@ -1972,7 +1972,7 @@ extern "C" void* getN64WeirdFrame(s32 i) {
|
|||
return &weirdFrameBytes[i + sizeof(n64WeirdFrames)];
|
||||
}
|
||||
|
||||
extern "C" int GetEquipNowMessage(char* buffer, char* src, const int maxBufferSize) {
|
||||
extern "C" size_t GetEquipNowMessage(char* buffer, char* src, const size_t maxBufferSize) {
|
||||
CustomMessage customMessage("\x04\x1A\x08"
|
||||
"Would you like to equip it now?"
|
||||
"\x09&&"
|
||||
|
@ -2013,7 +2013,7 @@ extern "C" int GetEquipNowMessage(char* buffer, char* src, const int maxBufferSi
|
|||
|
||||
if (!str.empty()) {
|
||||
memset(buffer, 0, maxBufferSize);
|
||||
const int copiedCharLen = std::min<int>(maxBufferSize - 1, str.length());
|
||||
const size_t copiedCharLen = std::min<size_t>(maxBufferSize - 1, str.length());
|
||||
memcpy(buffer, str.c_str(), copiedCharLen);
|
||||
return copiedCharLen;
|
||||
}
|
||||
|
@ -2155,7 +2155,7 @@ extern "C" int CustomMessage_RetrieveIfExists(PlayState* play) {
|
|||
uint16_t textId = msgCtx->textId;
|
||||
Font* font = &msgCtx->font;
|
||||
char* buffer = font->msgBuf;
|
||||
const int maxBufferSize = sizeof(font->msgBuf);
|
||||
const size_t maxBufferSize = sizeof(font->msgBuf);
|
||||
CustomMessage messageEntry;
|
||||
s16 actorParams = 0;
|
||||
if (IS_RANDO) {
|
||||
|
|
|
@ -121,7 +121,7 @@ int Controller_ShouldRumble(size_t slot);
|
|||
void Controller_BlockGameInput();
|
||||
void Controller_UnblockGameInput();
|
||||
void* getN64WeirdFrame(s32 i);
|
||||
int GetEquipNowMessage(char* buffer, char* src, const int maxBufferSize);
|
||||
size_t GetEquipNowMessage(char* buffer, char* src, const size_t maxBufferSize);
|
||||
u32 SpoilerFileExists(const char* spoilerFileName);
|
||||
Sprite* GetSeedTexture(uint8_t index);
|
||||
uint8_t GetSeedIconIndex(uint8_t index);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue