浏览代码

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 10 个月前
父节点
当前提交
fad215db38
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2
    2
      vncviewer/parameters.cxx

+ 2
- 2
vncviewer/parameters.cxx 查看文件

@@ -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];


正在加载...
取消
保存