From 2e08f75d02c3b08e6d8c983bae963f5709aa8311 Mon Sep 17 00:00:00 2001 From: lloyd Date: Sat, 3 Mar 2007 05:48:54 +0000 Subject: BigInt::operator[] now guards against accesses that are larger than the current register size; reads return 0, writes extend the buffer. --- include/bigint.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/bigint.h b/include/bigint.h index 44382b063..1772f1e51 100644 --- a/include/bigint.h +++ b/include/bigint.h @@ -78,8 +78,8 @@ class BigInt SecureVector& get_reg() { return reg; } void grow_reg(u32bit) const; - word& operator[](u32bit index) { return reg[index]; } - word operator[](u32bit index) const { return reg[index]; } + word& operator[](u32bit); + word operator[](u32bit) const; void clear() { reg.clear(); } void randomize(u32bit = 0); -- cgit v1.2.3