Skip to content

Commit 743a871

Browse files
author
yutingzeng
committed
fix 使用变量名错误
1 parent 70eee07 commit 743a871

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

TLSSigAPITest.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func main() {
2323
} else {
2424
fmt.Println(sig)
2525
}
26-
sig, err = tencentyun.GenPrivateMapKeyWithStringRoomID(sdkappid, key, "xiaojun", 86400*180, "agjk", 255)
26+
sig, err = tencentyun.GenPrivateMapKeyWithStringRoomID(sdkappid, key, "xiaojun", 86400*180, "1000000040", 255)
2727
if err != nil {
2828
fmt.Println(err.Error())
2929
} else {

tencentyun/TLSSigAPI.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ func genUserBuf(account string, dwSdkappid int, dwAuthID uint32,
9191

9292
offset := 0
9393

94-
length := 1 + 2 + len(account) + 20 + len(roomStr)
94+
length := 1 + 2 + len(account) + 22 + len(roomStr)
9595
userBuf := make([]byte, length)
9696

9797
//ver
@@ -170,7 +170,7 @@ func genUserBuf(account string, dwSdkappid int, dwAuthID uint32,
170170
offset++
171171

172172
for ; offset < length; offset++ {
173-
userBuf[offset] = account[offset-(length-len(roomStr))]
173+
userBuf[offset] = roomStr[offset-(length-len(roomStr))]
174174
}
175175
}
176176

0 commit comments

Comments
 (0)