summaryrefslogtreecommitdiffstats
path: root/core/templates/ring_buffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/templates/ring_buffer.h')
-rw-r--r--core/templates/ring_buffer.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/templates/ring_buffer.h b/core/templates/ring_buffer.h
index d878894946..54148a59bf 100644
--- a/core/templates/ring_buffer.h
+++ b/core/templates/ring_buffer.h
@@ -197,7 +197,7 @@ public:
int old_size = size();
int new_size = 1 << p_power;
int mask = new_size - 1;
- data.resize(1 << p_power);
+ data.resize(int64_t(1) << int64_t(p_power));
if (old_size < new_size && read_pos > write_pos) {
for (int i = 0; i < write_pos; i++) {
data.write[(old_size + i) & mask] = data[i];