Skip to content

Commit

Permalink
ts dc fix
Browse files Browse the repository at this point in the history
Signed-off-by: Ulf Bjorkengren <[email protected]>
  • Loading branch information
UlfBj committed Jan 6, 2025
1 parent ff8eace commit 6aeeec9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/vissv2server/wsMgr/wsMgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,10 +335,10 @@ func replaceTs(respMessage string, messageTs string, tsList []string) string {
signedTimeDiffStr := signedTimeDiff(strconv.Itoa(int(diffMs)), diffMs)
if preIndex == 0 {
respMessage = strings.Replace(respMessage[:postIndex], tsList[i], signedTimeDiffStr, 1) + respFraction
postIndex -= len(tsList[i]) - len(signedTimeDiffStr)
} else {
respMessage = respFraction + strings.Replace(respMessage[:postIndex], tsList[i], signedTimeDiffStr, 1)
respMessage = respFraction + strings.Replace(respMessage[preIndex:], tsList[i], signedTimeDiffStr, 1)
}
postIndex -= len(tsList[i]) - len(signedTimeDiffStr)
}
return respMessage
}
Expand Down

0 comments on commit 6aeeec9

Please sign in to comment.