Skip to content

Commit

Permalink
fix: single quotes can now be used to clear variables (fixes betterca…
Browse files Browse the repository at this point in the history
  • Loading branch information
evilsocket committed Feb 16, 2019
1 parent 6980b86 commit 742e7fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions session/session_core_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ func (s *Session) setHandler(args []string, sess *Session) error {
key := args[0]
value := args[1]

if value == "\"\"" {
if value == "\"\"" || value == "''" {
value = ""
}

Expand All @@ -240,7 +240,7 @@ func (s *Session) readHandler(args []string, sess *Session) error {

value, _ := reader.ReadString('\n')
value = str.Trim(value)
if value == "\"\"" {
if value == "\"\"" || value == "''" {
value = ""
}

Expand Down
1 change: 1 addition & 0 deletions session/session_parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ func ParseCommands(line string) []string {
finish := false

line = strings.Replace(line, `""`, `"<empty>"`, -1)
line = strings.Replace(line, `''`, `"<empty>"`, -1)
for _, c := range line {
switch c {
case ';':
Expand Down

0 comments on commit 742e7fd

Please sign in to comment.