Skip to content

Commit 0a21ede

Browse files
Potential fix for code scanning alert no. 50: Incorrect conversion between integer types
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 539168e commit 0a21ede

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

kafka/protocol.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ func getTag(f reflect.StructField) kafkaTag {
190190
case "nullable":
191191
if len(kv) == 1 {
192192
t.nullable = 0
193-
} else if i, err := strconv.Atoi(kv[1]); err == nil {
194-
t.nullable = int16(i)
193+
} else if parsed, err := strconv.ParseInt(kv[1], 10, 16); err == nil {
194+
t.nullable = int16(parsed)
195195
}
196196
}
197197
}

0 commit comments

Comments
 (0)