Mercurial > hg > orthanc-stone
comparison RenderingPlugin/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp @ 2081:3ef91da06636
fix compatibility with Emscripten 3.1.47
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 11 Oct 2023 16:38:38 +0200 |
parents | 07964689cb0b |
children | 517ef20aef74 |
comparison
equal
deleted
inserted
replaced
2080:3ca565841402 | 2081:3ef91da06636 |
---|---|
1668 { | 1668 { |
1669 // Assume compatibility with the mainline | 1669 // Assume compatibility with the mainline |
1670 return true; | 1670 return true; |
1671 } | 1671 } |
1672 | 1672 |
1673 #ifdef _MSC_VER | |
1674 #define ORTHANC_SCANF sscanf_s | |
1675 #else | |
1676 #define ORTHANC_SCANF sscanf | |
1677 #endif | |
1678 | |
1673 // Parse the version | 1679 // Parse the version |
1674 int aa, bb, cc; | 1680 int aa, bb, cc = 0; |
1675 if ( | 1681 if ((ORTHANC_SCANF(version, "%4d.%4d.%4d", &aa, &bb, &cc) != 3 && |
1676 #ifdef _MSC_VER | 1682 ORTHANC_SCANF(version, "%4d.%4d", &aa, &bb) != 2) || |
1677 sscanf_s | |
1678 #else | |
1679 sscanf | |
1680 #endif | |
1681 (version, "%4d.%4d.%4d", &aa, &bb, &cc) != 3 || | |
1682 aa < 0 || | 1683 aa < 0 || |
1683 bb < 0 || | 1684 bb < 0 || |
1684 cc < 0) | 1685 cc < 0) |
1685 { | 1686 { |
1686 return false; | 1687 return false; |