Commit 9b480bb7 authored by Robert Griesemer's avatar Robert Griesemer

bug fix: literals can be empty

R=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=30080
CL=30080
parent bbc2c038
......@@ -567,7 +567,7 @@ func (s *State) eval(fexpr expr, value reflect.Value, index int) bool {
s.hasOutput = true;
// write literal segments
for _, lit := range t {
if lit[0] == '%' && len(lit) > 1 {
if len(lit) > 1 && lit[0] == '%' {
// segment contains a %-format at the beginning
if lit[1] == '%' {
// "%%" is printed as a single "%"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment