Unverified Commit e48c9580 authored by Wolle's avatar Wolle Committed by GitHub

"or" in audio.h #374

parent f69582a4
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* Audio.h * Audio.h
* *
* Created on: Oct 28,2018 * Created on: Oct 28,2018
* Updated on: Sep 20,2022 * Updated on: Sep 24,2022
* Author: Wolle (schreibfaul1) * Author: Wolle (schreibfaul1)
*/ */
...@@ -371,7 +371,7 @@ private: ...@@ -371,7 +371,7 @@ private:
// some other functions // some other functions
size_t bigEndian(uint8_t* base, uint8_t numBytes, uint8_t shiftLeft = 8){ size_t bigEndian(uint8_t* base, uint8_t numBytes, uint8_t shiftLeft = 8){
size_t result = 0; size_t result = 0;
if(numBytes < 1 or numBytes > 4) return 0; if(numBytes < 1 || numBytes > 4) return 0;
for (int i = 0; i < numBytes; i++) { for (int i = 0; i < numBytes; i++) {
result += *(base + i) << (numBytes -i - 1) * shiftLeft; result += *(base + i) << (numBytes -i - 1) * shiftLeft;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment