Bitcoin Script Execution - Must end with just `true`?
Quoting Bitcoin wiki:


  A transaction is valid if nothing in the combined script triggers failure and the top stack item is true (non-zero). 


From the source code:

if (CastToBool(stack.back()) == false)
    return false;


(In case you don't know what vector.back() does, it returns the last item.)