mirror of
https://github.com/peterbraden/node-opencv.git
synced 2025-12-08 19:45:55 +00:00
Merge pull request #319 from vyacheslav-lonschakov/master
Fixed bug with compile in Visual Studio.
This commit is contained in:
commit
b6fd0f00f6
@ -1702,7 +1702,8 @@ NAN_METHOD(Matrix::Threshold) {
|
|||||||
"Use \"Binary\" (default), \"Binary Inverted\", "
|
"Use \"Binary\" (default), \"Binary Inverted\", "
|
||||||
"\"Threshold Truncated\", \"Threshold to Zero\" "
|
"\"Threshold Truncated\", \"Threshold to Zero\" "
|
||||||
"or \"Threshold to Zero Inverted\"";
|
"or \"Threshold to Zero Inverted\"";
|
||||||
char errorMessage[strlen(typeString) + strlen(text) + 2];
|
char *errorMessage;
|
||||||
|
errorMessage = new char[strlen(typeString) + strlen(text) + 2];
|
||||||
strcpy(errorMessage, "\"");
|
strcpy(errorMessage, "\"");
|
||||||
strcat(errorMessage, typeString);
|
strcat(errorMessage, typeString);
|
||||||
strcat(errorMessage, text);
|
strcat(errorMessage, text);
|
||||||
@ -1725,7 +1726,8 @@ NAN_METHOD(Matrix::Threshold) {
|
|||||||
char *algo = *algorithm;
|
char *algo = *algorithm;
|
||||||
char text[] = "\" is no supported threshold algorithm. "
|
char text[] = "\" is no supported threshold algorithm. "
|
||||||
"Use \"Simple\" (default) or \"Otsu\".";
|
"Use \"Simple\" (default) or \"Otsu\".";
|
||||||
char errorMessage[strlen(algo) + strlen(text) + 2];
|
char *errorMessage;
|
||||||
|
errorMessage = new char[strlen(algo) + strlen(text) + 2];
|
||||||
strcpy(errorMessage, "\"");
|
strcpy(errorMessage, "\"");
|
||||||
strcat(errorMessage, algo);
|
strcat(errorMessage, algo);
|
||||||
strcat(errorMessage, text);
|
strcat(errorMessage, text);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user