diff --git a/02_MENT/main_02_MENT.cpp b/02_MENT/main_02_MENT.cpp index 4844b36..f95e158 100644 --- a/02_MENT/main_02_MENT.cpp +++ b/02_MENT/main_02_MENT.cpp @@ -96,8 +96,8 @@ PascalString bitwiseDualAnd(PascalString a, PascalString b) { PascalString bitwiseHexAnd(PascalString a, PascalString b) { PascalString result = {a.length, '0'}; - for(int i = a.length; i >= 0; --i) { - if(b.length < i) result.characters[i] = a.characters[i]; + for(int i = b.length; i >= 0; --i) { + if(a.length < i) result.characters[i] = a.characters[i]; result.characters[i] = a.characters[i] & b.characters[i]; }