Skip to content

Commit

Permalink
fix possible short dump
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Ehrnsperger committed Jan 4, 2024
1 parent 855600c commit bdb9364
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
13 changes: 9 additions & 4 deletions recman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,15 +365,18 @@ template void StringAppendFrameParams<cToSvConcat<255>>(cToSvConcat<255> &s, con
return first->orderDuplicates(second, true, true);
}

int firstNonPunct(cSv s) {
size_t firstNonPunct(cSv s) {
// returns first non-punct char in s
unsigned int ret;
size_t ret;
for (ret = 0; ret < s.length() && std::ispunct(s[ret]); ret++ );
return ret;
}
int compareWithLocale(cSv first, cSv second) {
int start_f = firstNonPunct(first );
int start_s = firstNonPunct(second);
size_t start_f = firstNonPunct(first );
size_t start_s = firstNonPunct(second);
if (start_f >= first.length() && start_s >= second.length() ) return 0;
if (start_f >= first.length() ) return 1;
if (start_s >= second.length() ) return -1;
// see https://en.cppreference.com/w/cpp/locale/collate/compare
// Compares the character sequence [low1, high1) to the character sequence [low2, high2)
int i = g_collate_char.compare(&first[start_f], &first[0] + first.length(),
Expand Down Expand Up @@ -1137,13 +1140,15 @@ void AppendScraperData(cToSvConcat<0> &target, cSv s_IMDB_ID, const cTvMedia &s_
m_root->finishRecordingsTree();
std::chrono::duration<double> timeNeeded = std::chrono::high_resolution_clock::now() - begin;
dsyslog("live: DH: ------ RecordingsTree::RecordingsTree() --------, required time: %9.5f", timeNeeded.count() );
/*
timeRecs.print("live: timeRecs ");
timeItemRec.print("live: ItemRec ");
timeIdentify.print("live: Identify ");
timeOverview.print("live: Overview ");
timeImage.print("live: Image ");
timeDurationDeviation.print("live: Scraper ");
timeNumTsFiles.print("live: NumTsFiles");
*/
}

RecordingsTree::~RecordingsTree()
Expand Down
4 changes: 2 additions & 2 deletions setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

#include <vdr/menuitems.h>

#define LIVEVERSION "3.3.3"
#define LIVEVERSNUM 30303
#define LIVEVERSION "3.3.4"
#define LIVEVERSNUM 30304
#define LIVESUMMARY trNOOP("Live Interactive VDR Environment")

namespace vdrlive {
Expand Down

0 comments on commit bdb9364

Please sign in to comment.