summaryrefslogtreecommitdiff
path: root/protocols/Steam/src/protobuf-c/protobuf-c-text.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-12-17 23:24:44 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-12-17 23:24:44 +0300
commit4c3d77032316bc8814cddc00d020ba00d4533999 (patch)
tree1862e30966a69bf94a7288b95baed5b04a040d80 /protocols/Steam/src/protobuf-c/protobuf-c-text.cpp
parent4b5082aef3817173bc254755c0ec352da064a440 (diff)
Steam:
- contact statuses are back; - contact info is back too; - Miranda's account status is passed to the server; - some old code removed;
Diffstat (limited to 'protocols/Steam/src/protobuf-c/protobuf-c-text.cpp')
-rw-r--r--protocols/Steam/src/protobuf-c/protobuf-c-text.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/protocols/Steam/src/protobuf-c/protobuf-c-text.cpp b/protocols/Steam/src/protobuf-c/protobuf-c-text.cpp
index 68e54f143e..44fa0b7232 100644
--- a/protocols/Steam/src/protobuf-c/protobuf-c-text.cpp
+++ b/protocols/Steam/src/protobuf-c/protobuf-c-text.cpp
@@ -60,7 +60,7 @@ esc_str(const char *src, size_t len)
}
}
- char *dst = (char *)malloc((escapes * 4) + ((len - escapes) * 2) + 1);
+ char *dst = (char *)malloc((escapes * 2) + ((len - escapes) * 2) + 1);
if (!dst) {
return NULL;
}
@@ -95,12 +95,7 @@ esc_str(const char *src, size_t len)
/* Escape with octal if !isprint. */
default:
- if (!isprint(src[i])) {
- dst_len += sprintf(dst + dst_len, "\\%03o", src[i]);
- }
- else {
- dst[dst_len++] = src[i];
- }
+ dst[dst_len++] = src[i];
break;
}
}