Skip to content

Commit

Permalink
Escape forward slash (#640)
Browse files Browse the repository at this point in the history
  • Loading branch information
neurolabusc committed Oct 13, 2022
1 parent d0b24b9 commit 3eeef67
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion console/nii_dicom.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ extern "C" {
#define kCPUsuf " " //unknown CPU
#endif

#define kDCMdate "v1.0.20220923"
#define kDCMdate "v1.0.20221013"
#define kDCMvers kDCMdate " " kJP2suf kLSsuf kCCsuf kCPUsuf

static const int kMaxEPI3D = 1024; //maximum number of EPI images in Siemens Mosaic
Expand Down
2 changes: 1 addition & 1 deletion console/nii_dicom_batch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,7 @@ void json_Str(FILE *fp, const char *sLabel, char *sVal) { // issue131,425
int o = 0;
for (int i = 0; i < (int)strlen(sVal); i++) {
//escape double quote (") and Backslash
if ((sVal[i] == '"') || (sVal[i] == '\\')) { //escape double quotes and back slash
if ((sVal[i] == '"') || (sVal[i] == '\\') || (sVal[i] == '/')) { //escape double quotes, back slash, or slash
sValEsc[o] = '\\';
o++;
}
Expand Down

0 comments on commit 3eeef67

Please sign in to comment.