}
}
}
- else if (main->setting.flag & fss_read_main_flag_content_d) {
+ else if ((main->setting.flag & fss_read_main_flag_content_d) && (main->setting.feature & fss_read_feature_flag_object_as_line_d)) {
// An empty Object might still have white space.
- if (main->setting.contents.array[at].used && main->setting.contents.array[at].array[0].start <= main->setting.contents.array[at].array[0].stop) {
+ if (at < main->setting.contents.used && main->setting.contents.array[at].used && main->setting.contents.array[at].array[0].start <= main->setting.contents.array[at].array[0].stop) {
- // Skip past the new line and the object opener.
- if (main->setting.feature & fss_read_feature_flag_object_as_line_d) {
- if (main->setting.contents.array[at].array[0].start && main->setting.contents.array[at].array[0].start - 1) {
- before.stop = main->setting.contents.array[at].array[0].start - 2;
+ // Skip past the new line and the Object opener.
+ if (main->setting.contents.array[at].array[0].start && main->setting.contents.array[at].array[0].start - 1) {
+ before.stop = main->setting.contents.array[at].array[0].start - 2;
- if (main->setting.open_object.used) {
- --before.stop;
- }
+ if (main->setting.open_object.used) {
+ --before.stop;
+ }
- before.start = before.stop;
+ before.start = before.stop;
- while (before.start && main->setting.buffer.string[before.start] != f_string_eol_s.string[0]) --before.start;
+ while (before.start && main->setting.buffer.string[before.start] != f_string_eol_s.string[0]) --before.start;
- if (main->setting.buffer.string[before.start] == f_string_eol_s.string[0]) ++before.start;
- }
+ if (main->setting.buffer.string[before.start] == f_string_eol_s.string[0]) ++before.start;
}
}
}