From 26f63881e242947e7d4a5f5c3ce6f13305d2601e Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 13 Mar 2001 03:45:29 +0000 Subject: added STR_ASCII flag to srvstr_pull() (This used to be commit e54d37903013df1c799ab3aaa10f10df24e3de61) --- source3/smbd/srvstr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/smbd/srvstr.c b/source3/smbd/srvstr.c index e420b8fa99..b944ed2578 100644 --- a/source3/smbd/srvstr.c +++ b/source3/smbd/srvstr.c @@ -119,12 +119,12 @@ int srvstr_pull(void *inbuf, char *dest, const void *src, int dest_len, int src_ dest_len = sizeof(pstring); } - if (srvstr_align(inbuf, PTR_DIFF(src, inbuf))) { + if (!(flags & STR_ASCII) && srvstr_align(inbuf, PTR_DIFF(src, inbuf))) { src++; if (src_len > 0) src_len--; } - if (!(flags & STR_UNICODE) && !UNICODE_FLAG()) { + if ((flags & STR_ASCII) || (!(flags & STR_UNICODE) && !UNICODE_FLAG())) { /* the server doesn't want unicode */ if (flags & STR_TERMINATE) { safe_strcpy(dest, src, dest_len); -- cgit