mirror of
https://github.com/alsa-project/alsa-tools.git
synced 2026-03-02 01:40:13 -05:00
Karsten Wiese <annabellesgarden@yahoo.de>:
- Two Segmentation fault spots cleared.
This commit is contained in:
parent
ae6ba4c872
commit
e6764b8a6c
5 changed files with 31 additions and 12 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue