aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorlloyd <[email protected]>2007-03-03 05:48:54 +0000
committerlloyd <[email protected]>2007-03-03 05:48:54 +0000
commit2e08f75d02c3b08e6d8c983bae963f5709aa8311 (patch)
treec0a28d9f95e305db0a994caa5bb6ad13649903a7 /include
parenteb8b4aa9c0fa9e57f3c2446478714d596d873592 (diff)
BigInt::operator[] now guards against accesses that are larger than the
current register size; reads return 0, writes extend the buffer.
Diffstat (limited to 'include')
-rw-r--r--include/bigint.h4
1 files changed, 2 insertions, 2 deletions
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<word>& 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);