Changeset 8727 for trunk/gsdl/lib/gsdltools.cpp
- Timestamp:
- 2004-12-03T11:21:34+13:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/lib/gsdltools.cpp
r2937 r8727 53 53 } 54 54 55 void dm_js_safe(const text_t &instring, text_t &outstring) 56 { 57 text_t::const_iterator here = instring.begin(); 58 text_t::const_iterator end = instring.end(); 59 while (here != end) { 60 if (*here == '_') outstring.push_back('\\'); 61 else if (*here == '\\' || *here == '\'') { 62 outstring.push_back('\\'); 63 outstring.push_back('\\'); 64 } 65 outstring.push_back(*here); 66 ++here; 67 } 68 } 69 55 70 // gsdl_system creates a new process for the cmd command (which 56 71 // may contain arguments). … … 95 110 logout << "gsdl_system failed to start " << cmd_c 96 111 << " process, error code " << GetLastError(); 97 delete cmd_c;112 delete []cmd_c; 98 113 return -1; 99 114 } … … 118 133 logout << "gsdl_system failed to start " << cmd_c 119 134 << " process, command interpreter not found\n"; 120 delete cmd_c;135 delete []cmd_c; 121 136 return -1; 122 137 } … … 126 141 int pid = fork(); 127 142 if (pid == -1) { 128 delete cmd_c;143 delete []cmd_c; 129 144 return -1; 130 145 } … … 141 156 #endif 142 157 143 delete cmd_c;158 delete []cmd_c; 144 159 return ret; 145 160 }
Note:
See TracChangeset
for help on using the changeset viewer.