*sigh*, accidentally commited a wrong chunk as well as the right chunk.

Fix length check back to what it should be.
This commit is contained in:
Owain G. Ainsworth 2013-10-09 01:27:19 +01:00
parent 7ff3d5f871
commit 093ddbe193

View file

@ -332,7 +332,7 @@ func parseScriptTemplate(script []byte, opcodemap map[byte]*opcode) ([]parsedOpc
off = i + 1 - op.length // beginning of data off = i + 1 - op.length // beginning of data
// Disallow entries that do not fit script or were // Disallow entries that do not fit script or were
// sign extended. // sign extended.
if int(l) >= len(script[off:]) || int(l) < 0 { if int(l) > len(script[off:]) || int(l) < 0 {
return retScript, StackErrShortScript return retScript, StackErrShortScript
} }
pop.data = script[off : off+int(l)] pop.data = script[off : off+int(l)]