-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unexpected leading zero in configuration values #110
Comments
@rkaminsk Do you have any steps to reproduce for this? Furthermore, for me the following two assertions added to auto p = claspConfig_.getValue("configuration");
assert(p == "auto"); and auto k = claspConfig_.getKey(Clasp::Cli::ClaspCliConfig::key_root, "configuration");
char buffer[64];
auto x = claspConfig_.getValue(k, buffer, sizeof(buffer));
assert(x == 4 and std::strcmp(buffer, "auto") == 0); |
Sorry, my bad. It seems like int ClaspCliConfig::getValue(KeyType key, std::string& out) const sometimes clears the string it receives and sometimes it appends to it. I should simply clear the (reusable) string I am passing. (See |
You are right. The current behavior of |
Passing an empty string was what I intended anyway. I just forget to actually do it. Looking at the interface from a practical point of view, I don't think that appending to a string is a very common use case. It would however be the more flexible variant. The use case in clingo, which is probably the only one we have, requires setting the string to the value - there is no need to append. |
When printing the values of top level configuration entries, the meta value configuration is prefixed with a zero. Is this intended?
Tested on the dev-20 branch:
The text was updated successfully, but these errors were encountered: