Skip to content

Commit 7fb0fa2

Browse files
Copilott-b
andcommitted
Fix IsComplexWave to return boolean 0/1 instead of bitmask
Co-authored-by: t-b <[email protected]>
1 parent 3e7e5e4 commit 7fb0fa2

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Packages/MIES/MIES_Utilities_Checks.ipf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ End
239239
/// @brief Return 1 if the wave is a complex wave
240240
threadsafe Function IsComplexWave(WAVE wv)
241241

242-
return WaveType(wv) & IGOR_TYPE_COMPLEX
242+
return !!(WaveType(wv) & IGOR_TYPE_COMPLEX)
243243
End
244244

245245
/// @brief Return true if wv is a free wave, false otherwise

Packages/tests/Basic/UTF_Utils_Checks.ipf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -851,6 +851,7 @@ Function ICW_Works([STRUCT IUTF_mData &m])
851851
WAVE wv = m.w0
852852

853853
// Check if it's a complex wave
854+
// IsComplexWave returns 0 or 1
854855
variable waveTypeValue = WaveType(wv)
855856
variable expected = !!(waveTypeValue & IGOR_TYPE_COMPLEX)
856857

0 commit comments

Comments
 (0)