-
Notifications
You must be signed in to change notification settings - Fork 107
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
y_ini - name[] parameter contains an empty string for single character keys #192
Comments
I thought I already replied to this, apparently not...
As for why * Some people call this a bug, I'm not certain as it is well documented behaviour, just not what they expect by just thinking that all the function does is check if two strings are the same, which is not all it does, but anyway... |
Looking into it |
I screwed up this one, this catches key names including padding before the |
I fixed this. However, it is with a load of other commits, so I can't push just yet until the code all compiles correctly. For reference: YSI_Storage/y_ini/reading.inc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/YSI_Storage/y_ini/reading.inc b/YSI_Storage/y_ini/reading.inc
index b8260cd..6180a03 100644
--- a/YSI_Storage/y_ini/reading.inc
+++ b/YSI_Storage/y_ini/reading.inc
@@ -470,6 +470,8 @@ stock e_INI_LINE_TYPE:
case '=': return e_INI_LINE_TYPE_INVALID;
default: p0s = pos - 1;
}
+ // Default end point, for single-character lines.
+ end = pos;
//state_in_entry: // Default (fall-through).
// Get the key.
for ( ; ; ) |
I don't know if single character tags were a problem, but maybe, and this should do them as well. |
Actually, no it won't, but I think they worked anyway looking at the code. |
I'm trying to loop through the keys of an INI file using the
name[]
parameter. For keys of a single character the parameter contains an empty string instead of the key. Interestingly, reading the key usingINI_String
works fine.Code used:
.ini file:
The text was updated successfully, but these errors were encountered: