Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
18 May, 2013, 14:32:52 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: [1]   Go Down
  Print  
Author Topic: Issues with \0 character -  (Read 858 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
TravisE
LV4 Regular (Next: 200)
****
Offline Offline

Gender: Male
Last Login: 12 May, 2013, 08:58:49
Date Registered: 19 December, 2008, 05:36:00
Posts: 149

Total Post Ratings: +33

View Profile WWW
« on: 16 August, 2010, 22:21:27 »
0

Yes, strncat assumes 00h is a terminator. It does take a length as a parameter, but this is only used to ensure that it doesn't overflow the destination buffer (it will just truncate the string if it would go over). memcpy should do what you want—copying the actual number of characters you pass to it without caring what they are. As mentioned, you'll need an extra variable of some sort to keep track of the actual size of the data in this case.
« Last Edit: 16 August, 2010, 22:27:40 by TravisE » Logged

ticalc.org staff member—http://www.ticalc.org/
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.294 seconds with 31 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.