summaryrefslogtreecommitdiff
path: root/circular_queue.py
diff options
context:
space:
mode:
Diffstat (limited to 'circular_queue.py')
-rw-r--r--circular_queue.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/circular_queue.py b/circular_queue.py
index 424d1e5..44954bd 100644
--- a/circular_queue.py
+++ b/circular_queue.py
@@ -9,7 +9,7 @@ class circular_queue:
def add(self, value):
self.queue[self.pointer] = value
self.pointer += 1
- if self.pointer > 49:
+ if self.pointer >= self.size:
self.pointer = 0
def average(self):