Uploaded image for project: 'Module Tools'
  1. Module Tools
  2. MODTOOLS-103

diatheke prints no separator between first two results of search

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: diatheke
    • Labels:
    • Environment:

      Ubuntu 18.04.4 LTS x86_64

      Though I've manually compiled the latest source, and not using apt.

      Description

      If I search for verses with diatheke the first two results have no separator ( or evn space between them.

      Example:

      diatheke -f plain -b KJV -s multiword -k what is truth
      Entries containing "what is truth"-- II Samuel 15:20I Kings 2:4 ; I Kings 3:5 ; Psalms 30: 9 ; ...

      The issue can be fixed  by changing these lines in corediatheke.cpp:doquery

      if (first) first = false;
      else *output << " ; ";

      with this

      *output << " ; ";

       

      I'm slightly warry of just going ahead and changing this as the change seems quite deliberate, introduced in Rev3365. Not being familiar with the code I wouldn't be surprised if there's some other case where it is necessary. Though it looks like prior to this revision the code printed the separator first in the loop and would have needed this. So it may just be a fix and refactor mistake.

      If the fix is as straightforward as I think I wouldn't mind making this my first commit to the project.

        Attachments

          Activity

            People

            • Assignee:
              chrislit Chris Little
              Reporter:
              mosher Robert C Mosher
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: