瀏覽代碼

Merge pull request #2060 from craftwar/format

Fix Variable type and format specifier
Jim 6 年之前
父節點
當前提交
04d1f04bd3
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      UI/win-update/updater/hash.cpp
  2. 1 1
      plugins/win-capture/graphics-hook/graphics-hook.c

+ 1 - 1
UI/win-update/updater/hash.cpp

@@ -35,7 +35,7 @@ void HashToString(const uint8_t *in, wchar_t *out)
 
 void StringToHash(const wchar_t *in, BYTE *out)
 {
-	int temp;
+	unsigned int temp;
 
 	for (int i = 0; i < BLAKE2_HASH_LENGTH; i++) {
 		swscanf_s(in + i * 2, L"%02x", &temp);

+ 1 - 1
plugins/win-capture/graphics-hook/graphics-hook.c

@@ -493,7 +493,7 @@ static inline void unlock_shmem_tex(int id)
 static inline bool init_shared_info(size_t size)
 {
 	wchar_t name[64];
-	_snwprintf(name, 64, L"%s%ld", SHMEM_TEXTURE, ++shmem_id_counter);
+	_snwprintf(name, 64, L"%s%u", SHMEM_TEXTURE, ++shmem_id_counter);
 
 	shmem_file_handle = CreateFileMappingW(INVALID_HANDLE_VALUE, NULL,
 					       PAGE_READWRITE, 0, (DWORD)size,