Skip to content

Commit

Permalink
fix: more defensive coding
Browse files Browse the repository at this point in the history
Don't try to put 0 in a bitstring
  • Loading branch information
isc-tleavitt committed Sep 24, 2024
1 parent cae9131 commit 0f6af11
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cls/TestCoverage/Procedures.cls
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ ClassMethod ListToBit(pSource As %List) As %Binary [ SqlName = LIST_TO_BIT, SqlP
Set tResult = ""
Set tPointer = 0
While $ListNext(pSource,tPointer,tBitPosition) {
If $Data(tBitPosition)#2 && (tBitPosition '= "") {
Set $Bit(tResult,tBitPosition) = 1
If $Data(tBitPosition)#2 && (+tBitPosition > 0) {
Set $Bit(tResult,+tBitPosition) = 1
}
}
Quit tResult
Expand Down

0 comments on commit 0f6af11

Please sign in to comment.