Skip to content
Snippets Groups Projects
Commit 72dae8e7 authored by Bensong Liu's avatar Bensong Liu
Browse files

bug fix

parent 82b470f9
No related branches found
No related tags found
No related merge requests found
...@@ -10,7 +10,7 @@ import ( ...@@ -10,7 +10,7 @@ import (
// Some options here. Would be improved in beta release. // Some options here. Would be improved in beta release.
const DEDUCT_PKGNAME_FROM_VARNAME = true const DEDUCT_PKGNAME_FROM_VARNAME = true
const USE_PROJECT_NETVER_INSTEAD_OF_HINTPATH_NETVER = false const USE_PROJECT_NETVER_INSTEAD_OF_HINTPATH_NETVER = false
const OPENXT_VERSION = "1.0.3b" const OPENXT_VERSION = "1.0.3-1b"
func print_help_and_exit() { func print_help_and_exit() {
println("Usage: openxt <subcommand> [options...]") println("Usage: openxt <subcommand> [options...]")
......
...@@ -104,7 +104,14 @@ func main() { ...@@ -104,7 +104,14 @@ func main() {
} }
if removeEndRefInNextLine { if removeEndRefInNextLine {
pos := stringIndexInsensitive(line, "</Reference>"); pos := stringIndexInsensitive(line, "</Reference>");
line = line[pos+len("</Reference>"):] if pos == -1 {
// this line still not contains </Reference>
// Skip this line and keep checking next line.
continue
} else {
line = line[pos+len("</Reference>"):]
removeEndRefInNextLine = false
}
} }
resultTxt += line + "\n" resultTxt += line + "\n"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment