We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 96695e2 commit 2418a49Copy full SHA for 2418a49
core/sourcehook/sh_memory.h
@@ -322,8 +322,11 @@ namespace SourceHook
322
prevHandler = signal(SIGSEGV, BadReadHandler);
323
324
volatile const char *p = reinterpret_cast<const char*>(addr);
325
+ char dummy;
326
+
327
for (size_t i = 0; i < len; i++)
- p[i];
328
+ dummy = p[i];
329
+ (void)dummy; // silence unused var, we must read from p
330
331
g_BadReadCalled = false;
332
@@ -344,8 +347,11 @@ namespace SourceHook
344
347
return false;
345
348
346
349
volatile const char *p = reinterpret_cast<const char *>(addr);
350
351
352
353
354
355
356
357
0 commit comments