Karsten Wiese <annabellesgarden@yahoo.de>:

- Two Segmentation fault spots cleared.
This commit is contained in:
Takashi Iwai 2003-12-03 10:39:23 +00:00
parent ae6ba4c872
commit e6764b8a6c
5 changed files with 31 additions and 12 deletions

View file

@ -25,11 +25,24 @@
class Cus428_ctls: public us428_ctls{
public:
Cus428_ctls() {
memset(this, 0, sizeof(*this));
}
void dump(int n = 0);
void analyse(Cus428_ctls& Previous, unsigned n = 0);
void analyse(Cus428_ctls *Previous, unsigned n = 0);
bool Knob( int K) {
return ((char*)this)[K / 8] & (1 << K % 8);
}
protected:
unsigned char ValAt(int i) {
return ((unsigned char*)this)[i];
}
unsigned char DiffValAt(Cus428_ctls *Other, int i) {
return ValAt(i) - Other->ValAt(i);
}
unsigned char DiffBitAt(Cus428_ctls *Other, int i) {
return ValAt(i) ^ Other->ValAt(i);
}
};
#endif