GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Embed Notice

HTML Code

Corresponding Notice

  1. Embed this notice
    lfa :emacs: :tux: :freebsd: (lfa@hostux.social)'s status on Saturday, 16-Nov-2024 03:17:51 JSTlfa :emacs: :tux: :freebsd:lfa :emacs: :tux: :freebsd:
    in reply to
    • Panicz Maciej Godek

    @PaniczGodek because char, unsigned char and signed char are integer types.

    A char can contain a value from -128 up to 127. 0x80 is 128 so when you set 0x80 to a char variable it's going to overflow. That's why your if fails because you are comparing if your char is 128 and it's not.

    If you use an unsigned char which can hold values from 0 to 255 then your if is going to work as expected.

    In conversationabout 7 months ago from hostux.socialpermalink
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.