From 66ded096a60c69ffbec5d15fca9b63f5be3e9d47 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?=
 <grubba@grubba.org>
Date: Thu, 15 Oct 1998 15:55:50 +0200
Subject: [PATCH] Fixed bug in string_to_unicode() for 8bit strings.

Rev: src/builtin_functions.c:1.132
---
 src/builtin_functions.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/builtin_functions.c b/src/builtin_functions.c
index 24b9fd1177..b688558dd5 100644
--- a/src/builtin_functions.c
+++ b/src/builtin_functions.c
@@ -4,7 +4,7 @@
 ||| See the files COPYING and DISCLAIMER for more information.
 \*/
 #include "global.h"
-RCSID("$Id: builtin_functions.c,v 1.131 1998/10/15 02:42:39 grubba Exp $");
+RCSID("$Id: builtin_functions.c,v 1.132 1998/10/15 13:55:50 grubba Exp $");
 #include "interpret.h"
 #include "svalue.h"
 #include "pike_macros.h"
@@ -614,7 +614,7 @@ void f_string_to_unicode(INT32 args)
     out = begin_shared_string(len);
     MEMSET(out->str, 0, len);	/* Clear the upper (and lower) byte */
     for(i = in->len; i--;) {
-      out->str[i * 2] = in->str[i];
+      out->str[i * 2 + 1] = in->str[i];
     }
     out = end_shared_string(out);
     break;
-- 
GitLab