Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Wired Problem  (Read 2431 times)

0 Members and 1 Guest are viewing this topic.

EiTkoCaT

  • Newbie
  • *
  • Posts: 47
    • View Profile
Wired Problem
« on: November 20, 2010, 08:33:30 pm »
Hello,

I'm using SFML to get messages from clients. I'm sending a msg, for exemple: "Schogini Systems", but somewhy, I get in the server this "Schogini Systems╠╠╠╠▌óea└÷^♦]ז╖".

When I'm sending MSGS from a SFML client it's all OK.

WTF?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Wired Problem
« Reply #1 on: November 20, 2010, 09:01:04 pm »
You probably forget to end your string with a '\0', so when you display it you get all the garbage located after your characters in memory, until a 0 is found.
Laurent Gomila - SFML developer

EiTkoCaT

  • Newbie
  • *
  • Posts: 47
    • View Profile
Wired Problem
« Reply #2 on: November 20, 2010, 09:07:29 pm »
You are right..