Fixed bug on file2var for leading 0

This commit is contained in:
2019-02-25 20:53:43 +08:00
parent 6bf6c5a3ba
commit 2f7b619b3b
2 changed files with 1 additions and 1 deletions

Binary file not shown.

View File

@@ -48,7 +48,7 @@ func convertSanitize(inByte []byte) string {
} else if inByte[i] > 32 && inByte[i] < 126{ } else if inByte[i] > 32 && inByte[i] < 126{
sb.WriteByte(inByte[i]) sb.WriteByte(inByte[i])
} else { } else {
sb.WriteString(fmt.Sprintf("\\x%2x",inByte[i])) sb.WriteString(fmt.Sprintf("\\x%02x",inByte[i]))
} }
if i%50 ==0 { if i%50 ==0 {
sb.WriteString("\"\nfileVar += \"") sb.WriteString("\"\nfileVar += \"")