escape % signs

This commit is contained in:
Patrick Nagurny
2018-12-27 15:31:50 -05:00
parent cf1d312f9e
commit 291538e341
2 changed files with 4 additions and 0 deletions

View File

@@ -63,6 +63,9 @@ func (db *DB) Escape(sql string) string {
break break
case '\032': /* This gives problems on Win32 */ case '\032': /* This gives problems on Win32 */
escape = 'Z' escape = 'Z'
break
case '%':
escape = '%'
} }
if escape != 0 { if escape != 0 {

View File

@@ -183,6 +183,7 @@ func unsubscribe(conn *websocket.Conn, key string, clientMap map[string][]*webso
} }
func unsubscribeAll(conn *websocket.Conn) { func unsubscribeAll(conn *websocket.Conn) {
// TODO fix "concurrent map iteration and map write" error
for key, conns := range txSubscriptions { for key, conns := range txSubscriptions {
newConns := conns[:0] newConns := conns[:0]
for _, c := range conns { for _, c := range conns {