summaryrefslogtreecommitdiffstats
path: root/xrdp/funcs.c
diff options
context:
space:
mode:
authorjsorg71 <jsorg71>2005-01-21 03:55:16 +0000
committerjsorg71 <jsorg71>2005-01-21 03:55:16 +0000
commitf0c7bdb304846829259edaab25454f81ab5a4c36 (patch)
treeba94a6f4a45f29c741490e06bf89deca50041874 /xrdp/funcs.c
parentb2741d1ed23982d0bfd3016d998c4cbfb3c4ab8e (diff)
downloadxrdp-proprietary-f0c7bdb304846829259edaab25454f81ab5a4c36.tar.gz
xrdp-proprietary-f0c7bdb304846829259edaab25454f81ab5a4c36.zip
added pointer cache, some debug messages and some other fixes
Diffstat (limited to 'xrdp/funcs.c')
-rw-r--r--xrdp/funcs.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/xrdp/funcs.c b/xrdp/funcs.c
index 35c95445..4c3ac42b 100644
--- a/xrdp/funcs.c
+++ b/xrdp/funcs.c
@@ -285,7 +285,9 @@ int add_char_at(char* text, char ch, int index)
return 0;
}
for (i = len - 1; i >= index; i--)
+ {
text[i + 1] = text[i];
+ }
text[i + 1] = ch;
text[len + 1] = 0;
return 0;
@@ -301,14 +303,18 @@ int remove_char_at(char* text, int index)
len = g_strlen(text);
if (len <= 0)
+ {
return 0;
+ }
if (index >= len - 1 || index < 0)
{
text[len - 1] = 0;
return 0;
}
for (i = index; i < len - 1; i++)
+ {
text[i] = text[i + 1];
+ }
text[len - 1] = 0;
return 0;
}
@@ -317,7 +323,9 @@ int remove_char_at(char* text, int index)
int set_string(char** in_str, char* in)
{
if (in_str == 0)
+ {
return 0;
+ }
g_free(*in_str);
*in_str = g_strdup(in);
return 0;