64 bitshift bug
- Date: Wed, 2 Jan 2008 02:06:18 +0100
- From: "Lieven van der Heide" <lievenvanderheide@xxxxxxxxx>
- Subject: 64 bitshift bug
Hi, In gmarkup.c, there's this line: if ((collected & (1 << i)) == 0) collected is a 64 bit integer, but 1 << i results in a 32 bit integer, which is then converted to 64 bits, for the & operator. I assume we just want to test any of the 64 bits, using an index in i, in which case it should be: if ((collected & ((guint64)1 << i)) == 0) I attached a patch that fixes it. Greets, Lieven van der Heide.
Attachment:
64bit bitshift.patch
Description: Binary data
_______________________________________________ gtk-devel-list mailing list gtk-devel-list@xxxxxxxxx http://mail.gnome.org/mailman/listinfo/gtk-devel-list
- Follow-Ups:
- Re: 64 bitshift bug
- From: Ryan Lortie
- Re: 64 bitshift bug
- Prev by Date: Re: testglib and user-dirs.dirs
- Next by Date: Re: 64 bitshift bug
- Previous by thread: gpointer vs gpointer* in GtkBuilderIface
- Next by thread: Re: 64 bitshift bug
- Index(es):