Merge pull request #92 from tsu-ku-ne/master

Fix bug that invalid generate Go code.
pull/4/head
Jim Teeuwen 2015-05-29 13:51:24 +02:00
commit 3ad80867de
1 changed files with 3 additions and 1 deletions

View File

@ -229,7 +229,9 @@ func safeFunctionName(name string, knownFuncs map[string]int) string {
for i := 0; i < len(inBytes); i++ {
if regFuncName.Match([]byte{inBytes[i]}) {
i++
for j := i; j < len(inBytes) && regFuncName.Match([]byte{inBytes[j]}); j++ {
i++
}
outBytes = append(outBytes, []byte(strings.ToUpper(string(inBytes[i])))...)
// bytes[i] = strings.ToUpper(string(byte))
} else {