linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick Leslie Polzer <leslie.polzer@gmx.net>
To: Markus Rechberger <mrechberger@gmail.com>
Cc: linux-c-programming@vger.kernel.org
Subject: Re: wcscat problem
Date: Thu, 19 Jan 2006 19:24:21 +0100	[thread overview]
Message-ID: <20060119192421.2674b02a.leslie.polzer@gmx.net> (raw)
In-Reply-To: <d9def9db0601190957v78b9ca71yaac25a0c7ef43d09@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 919 bytes --]

On Thu, 19 Jan 2006 18:57:57 +0100
Markus Rechberger <Markus Rechberger <mrechberger@gmail.com>> wrote:

 | some headers are missing within your source too.
Obviously, but this was intended to be a minimal example, and
most compilers will get it without the headers.

 | it should look like the code attached then it will work.
I'm not sure whether you understood my problem.
Perhaps I should have made myself clearer:

The code compiles and runs.
The problem ist that the wcscat operation seems to not overwrite
the terminating null byte of the first string "abc" and thus
printf will only print "abc" instead of "abcdef".  To clarify this
I added 4 to the string -- and lo, the missing half is there, but a
null bytes separates both halves.

So my question is: why does strcat remove the \0, but the wide char
pendant does not?

Leslie

-- 
gpg --keyserver pgp.mit.edu --recv-keys 0x52D70289

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2006-01-19 18:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-19 15:38 wcscat problem Patrick Leslie Polzer
2006-01-19 17:57 ` Markus Rechberger
2006-01-19 18:24   ` Patrick Leslie Polzer [this message]
2006-01-19 20:52 ` Steve Graegert
2006-01-22 10:30 ` Glynn Clements

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060119192421.2674b02a.leslie.polzer@gmx.net \
    --to=leslie.polzer@gmx.net \
    --cc=linux-c-programming@vger.kernel.org \
    --cc=mrechberger@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).