From b9541d9a15799882bcdc26c5081b38c7126f85e0 Mon Sep 17 00:00:00 2001 From: The Dax Date: Mon, 5 Aug 2013 23:29:59 -0400 Subject: [PATCH] Switch to size_t instead of u32. --- Core/Dialog/PSPOskDialog.cpp | 4 +++- Windows/InputBox.cpp | 2 +- Windows/InputBox.h | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Core/Dialog/PSPOskDialog.cpp b/Core/Dialog/PSPOskDialog.cpp index 7256d7b61f..5de6ad3495 100755 --- a/Core/Dialog/PSPOskDialog.cpp +++ b/Core/Dialog/PSPOskDialog.cpp @@ -781,7 +781,9 @@ int PSPOskDialog::NativeKeyboard() if(description_text.length() < defaultText_len) sprintf(windowTitle, description_text.c_str()); - if(!InputBox_GetString(0, MainWindow::hwndMain, windowTitle, defaultText, input, FieldMaxLength())) { + size_t maxInputLength = FieldMaxLength(); + + if(!InputBox_GetString(0, MainWindow::hwndMain, windowTitle, defaultText, input, maxInputLength)) { sprintf(input, ""); } #endif diff --git a/Windows/InputBox.cpp b/Windows/InputBox.cpp index a2d54882e9..470474accd 100644 --- a/Windows/InputBox.cpp +++ b/Windows/InputBox.cpp @@ -51,7 +51,7 @@ bool InputBox_GetString(HINSTANCE hInst, HWND hParent, TCHAR *title, TCHAR *defa return false; } -bool InputBox_GetString(HINSTANCE hInst, HWND hParent, TCHAR *title, TCHAR *defaultvalue, TCHAR *outvalue, u32 outlength) +bool InputBox_GetString(HINSTANCE hInst, HWND hParent, TCHAR *title, TCHAR *defaultvalue, TCHAR *outvalue, size_t outlength) { const char *defaultTitle = "Input value"; diff --git a/Windows/InputBox.h b/Windows/InputBox.h index d6c9690df8..687d683b13 100644 --- a/Windows/InputBox.h +++ b/Windows/InputBox.h @@ -4,5 +4,5 @@ #include "Common/CommonWindows.h" bool InputBox_GetString(HINSTANCE hInst, HWND hParent, TCHAR *title, TCHAR *defaultvalue, TCHAR *outvalue); -bool InputBox_GetString(HINSTANCE hInst, HWND hParent, TCHAR *title, TCHAR *defaultvalue, TCHAR *outvalue, u32 outlength); +bool InputBox_GetString(HINSTANCE hInst, HWND hParent, TCHAR *title, TCHAR *defaultvalue, TCHAR *outvalue, size_t outlength); bool InputBox_GetHex(HINSTANCE hInst, HWND hParent, TCHAR *title, u32 defaultvalue, u32 &outvalue);