[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/emacsql 3e16afce8b 281/427: Escape backslashes as well.
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/emacsql 3e16afce8b 281/427: Escape backslashes as well. |
Date: |
Tue, 13 Dec 2022 02:59:51 -0500 (EST) |
branch: elpa/emacsql
commit 3e16afce8b2a7e0573816a7b3b30828c5f046b43
Author: Christopher Wellons <wellons@nullprogram.com>
Commit: Christopher Wellons <wellons@nullprogram.com>
Escape backslashes as well.
---
sqlite/emacsql.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sqlite/emacsql.c b/sqlite/emacsql.c
index a3f4484d7b..34b3481c10 100644
--- a/sqlite/emacsql.c
+++ b/sqlite/emacsql.c
@@ -9,14 +9,14 @@
char* escape(const char *message) {
int i, count = 0, length_orig = strlen(message);
for (i = 0; i < length_orig; i++) {
- if (message[i] == '"') {
+ if (strchr("\"\\", message[i])) {
count++;
}
}
char *copy = malloc(length_orig + count + 1);
char *p = copy;
while (*message) {
- if (*message == '"') {
+ if (strchr("\"\\", *message)) {
*p = '\\';
p++;
}
- [nongnu] elpa/emacsql 0f5f560f8b 267/427: Fix README example typo., (continued)
- [nongnu] elpa/emacsql 0f5f560f8b 267/427: Fix README example typo., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 203cff9007 269/427: Rename the project to EmacSQL., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 38bd19ed6f 276/427: Oops, use the right equality., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 50e47ee01a 278/427: Remove shell quote., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 6c7576e497 295/427: Rename condition emacsql-lock to emacsql-locked., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 39ce3b9736 287/427: Smarter identifier identification in expressions., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 20391923d1 292/427: Add option to disable local builds., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql b375cd7759 294/427: Bump version number due to protocol change., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql b60d9e05e2 277/427: Flesh out some docstrings., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql ce05c8b2e2 305/427: Fix MySQL quoting., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 3e16afce8b 281/427: Escape backslashes as well.,
ELPA Syncer <=
- [nongnu] elpa/emacsql 3c57f9a986 308/427: Adjust MySQL isolation level., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql c68f11b74e 313/427: Register emacsql-pg for unit testing., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql ef4bcec524 321/427: Conform to elisp header conventions, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql c1ea25c872 322/427: Drop Windows issue from README (fixed in 24.4)., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 2bc599d856 327/427: Add separate package headers for each backend., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql e498dd1dea 336/427: Drop emacsql-escape-format's KIND argument., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 3042597a72 343/427: Add note about lack of Windows support., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 5ad4d2da9a 355/427: fix ldlibs for berkeley-unix systems, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql a96b2587c4 365/427: Update README to mention FTS5 (#40), ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 5ebd12b6ff 377/427: Add some support for the ESCAPE operator, ELPA Syncer, 2022/12/13