<- Back to shtanton's homepage
aboutsummaryrefslogtreecommitdiff
path: root/walk
diff options
context:
space:
mode:
Diffstat (limited to 'walk')
-rw-r--r--walk/read.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/walk/read.go b/walk/read.go
index e1b33a4..bedb856 100644
--- a/walk/read.go
+++ b/walk/read.go
@@ -179,10 +179,10 @@ func (in *JSONIn) Read() (WalkItem, error) {
}
}
action := in.actionBuffer[in.actionIndex]
+ in.actionIndex++
switch action {
case ActionReadValue:
value := in.readValue()
- in.actionIndex++
return WalkItem {
Value: value,
Path: in.path,
@@ -208,7 +208,6 @@ func (in *JSONIn) Read() (WalkItem, error) {
default:
panic("Invalid ReadAction")
}
- in.actionIndex++
}
}