Michael Hunley wrote:
I am getting an assertion in the following code because pTos->flags is set to 0x26, which translates into MEM_Static | MEM_Str | MEM_Int. The value on the top of the stack is 1024. pTos->i is correctly 1024. It is being used in an expression "UPDATE DBPrefs set Preferences=Preferences&(~1024);". I am using sqlite 2.8.11 under windows.

case OP_BitNot: {
  assert( pTos>=p->aStack );
  if( pTos->flags & MEM_Null ) break;  /* Do nothing to NULLs */
  Integerify(pTos);
  assert( pTos->flags==MEM_Int );
  pTos->i = ~pTos->i;
  break;
}

So, should the assert be changed to:
  assert( (pTos->flags&MEM_Int)!=0 );

Or is the code that is setting the top-of-stack flags incorrectly setting more than just MEM_Int?

It appears that it is just a bad assert, but...


See http://www.sqlite.org/cvstrac/chngview?cn=1283



-- D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to