script: don't read past the end

This commit is contained in:
Cory Fields 2014-09-23 16:53:58 -04:00
parent a94496fbb6
commit be6d87aa60
1 changed files with 2 additions and 1 deletions

View File

@ -839,7 +839,8 @@ public:
itBegin = it;
}
}
s.write((char*)&itBegin[0], it-itBegin);
if (itBegin != scriptCode.end())
s.write((char*)&itBegin[0], it-itBegin);
}
/** Serialize an input of txTo */