Skip to content

Commit 0f6af11

Browse files
committed
fix: more defensive coding
Don't try to put 0 in a bitstring
1 parent cae9131 commit 0f6af11

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cls/TestCoverage/Procedures.cls

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ ClassMethod ListToBit(pSource As %List) As %Binary [ SqlName = LIST_TO_BIT, SqlP
8282
Set tResult = ""
8383
Set tPointer = 0
8484
While $ListNext(pSource,tPointer,tBitPosition) {
85-
If $Data(tBitPosition)#2 && (tBitPosition '= "") {
86-
Set $Bit(tResult,tBitPosition) = 1
85+
If $Data(tBitPosition)#2 && (+tBitPosition > 0) {
86+
Set $Bit(tResult,+tBitPosition) = 1
8787
}
8888
}
8989
Quit tResult

0 commit comments

Comments
 (0)