aboutsummaryrefslogtreecommitdiff
path: root/session.go
diff options
context:
space:
mode:
Diffstat (limited to 'session.go')
-rw-r--r--session.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/session.go b/session.go
index c156710..dc07e15 100644
--- a/session.go
+++ b/session.go
@@ -414,6 +414,10 @@ func (ses *Session) close() (err error) {
// executeRequires run the "#require:" statements from line 0 until
// the start argument in the local system.
func (ses *Session) executeRequires(req *ExecRequest, pos linePosition) (err error) {
+ if pos.start >= int64(len(req.script.requires)) {
+ return nil
+ }
+
var (
stmt *Statement
x int64