aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/buffer_cache
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-06-10 22:17:33 -0700
committerGitHub <noreply@github.com>2021-06-10 22:17:33 -0700
commitf0732b09b85db549e2b55d0d310d58f8b9378af5 (patch)
treeb8639614c724fb83f959e50da8608236b0210ebf /src/video_core/buffer_cache
parent531246344f1830eab98d918a3a53e03b6086fe75 (diff)
parente7c2b054c198bcf7c39a2943f76c866be09aa7d7 (diff)
Merge pull request #6445 from degasus/fix_ubsn
Fix GCC undefined behavior sanitizer.
Diffstat (limited to 'src/video_core/buffer_cache')
-rw-r--r--src/video_core/buffer_cache/buffer_base.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/video_core/buffer_cache/buffer_base.h b/src/video_core/buffer_cache/buffer_base.h
index 0c00ae280e..a395059036 100644
--- a/src/video_core/buffer_cache/buffer_base.h
+++ b/src/video_core/buffer_cache/buffer_base.h
@@ -476,6 +476,9 @@ private:
current_size = 0;
on_going = false;
}
+ if (empty_bits == PAGES_PER_WORD) {
+ break;
+ }
page += empty_bits;
const int continuous_bits = std::countr_one(word >> page);