Created
February 2, 2015 20:12
-
-
Save sapier/d715be2ba96c50d79a7a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/craftdef.cpp b/src/craftdef.cpp | |
index 9cd1d8c..fa1f9ea 100644 | |
--- a/src/craftdef.cpp | |
+++ b/src/craftdef.cpp | |
@@ -954,7 +954,9 @@ class CCraftDefManager: public IWritableCraftDefManager | |
try { | |
tmpout = def->getOutput(input, gamedef); | |
- if(tmpout.item.substr(0,output.item.length()) == output.item) | |
+ if((tmpout.item.substr(0,output.item.length()) == output.item) && | |
+ ((tmpout.item[output.item.length()] == 0) || | |
+ (tmpout.item[output.item.length()] == ' '))) | |
{ | |
// Get output, then decrement input (if requested) | |
input = def->getInput(output, gamedef); | |
@@ -991,7 +993,9 @@ class CCraftDefManager: public IWritableCraftDefManager | |
try { | |
tmpout = def->getOutput(input, gamedef); | |
- if(tmpout.item.substr(0,output.item.length()) == output.item) | |
+ if((tmpout.item.substr(0,output.item.length()) == output.item) && | |
+ ((tmpout.item[output.item.length()] == 0) || | |
+ (tmpout.item[output.item.length()] == ' '))) | |
{ | |
// Get output, then decrement input (if requested) | |
input = def->getInput(output, gamedef); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment