We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents eddaba7 + 17ac0f4 commit 7cbed7fCopy full SHA for 7cbed7f
src/bitcoin-tx.cpp
@@ -143,13 +143,14 @@ static void RegisterLoad(const string& strInput)
143
valStr.insert(valStr.size(), buf, bread);
144
}
145
146
- if (ferror(f)) {
+ int error = ferror(f);
147
+ fclose(f);
148
+
149
+ if (error) {
150
string strErr = "Error reading file " + filename;
151
throw runtime_error(strErr);
152
153
- fclose(f);
-
154
// evaluate as JSON buffer register
155
RegisterSetJson(key, valStr);
156
0 commit comments