Browse Source

Use smaller, stable, int for history index

The size of size_t depends on the architecture, so we need to have
different conversion to and from strings. But we don't really need that
range, so avoid the issue by using a standard integer size.
pull/1645/head
Pierre Ossman 9 months ago
parent
commit
fad215db38
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      vncviewer/parameters.cxx

+ 2
- 2
vncviewer/parameters.cxx View File

@@ -427,7 +427,7 @@ void saveHistoryToRegKey(const vector<string>& serverHistory) {
if (res != ERROR_SUCCESS)
throw rdr::SystemException(_("Failed to create registry key"), res);

size_t index = 0;
unsigned index = 0;
assert(SERVER_HISTORY_SIZE < 100);
char indexString[3];

@@ -517,7 +517,7 @@ void loadHistoryFromRegKey(vector<string>& serverHistory) {
throw rdr::SystemException(_("Failed to open registry key"), res);
}

size_t index;
unsigned index;
const DWORD buffersize = 256;
char indexString[3];


Loading…
Cancel
Save