mirror of
https://github.com/dvorka/hstr.git
synced 2025-02-25 15:26:25 +08:00
Merge pull request #257 from snehm/master
Fixing pointer initialisation to ensure correct tests especially on binaries compiled w/ optimizations.
This commit is contained in:
commit
2ae5f1a7a3
1 changed files with 9 additions and 9 deletions
18
src/hstr.c
18
src/hstr.c
|
@ -643,9 +643,9 @@ unsigned hstr_make_selection(char *prefix, HistoryItems *history, int maxSelecti
|
||||||
bool regexpCompilationError=false;
|
bool regexpCompilationError=false;
|
||||||
bool keywordsAllMatch;
|
bool keywordsAllMatch;
|
||||||
char *keywordsSavePtr=NULL;
|
char *keywordsSavePtr=NULL;
|
||||||
char *keywordsToken;
|
char *keywordsToken=NULL;
|
||||||
char *keywordsParsedLine;
|
char *keywordsParsedLine=NULL;
|
||||||
char *keywordsPointerToDelete;
|
char *keywordsPointerToDelete=NULL;
|
||||||
for(i=0; i<count && selectionCount<maxSelectionCount; i++) {
|
for(i=0; i<count && selectionCount<maxSelectionCount; i++) {
|
||||||
if(source[i]) {
|
if(source[i]) {
|
||||||
if(!prefix || !strlen(prefix)) {
|
if(!prefix || !strlen(prefix)) {
|
||||||
|
@ -759,12 +759,12 @@ void print_selection_row(char *text, int y, int width, char *pattern)
|
||||||
if(hstr->theme & HH_THEME_COLOR) {
|
if(hstr->theme & HH_THEME_COLOR) {
|
||||||
color_attr_on(COLOR_PAIR(HH_COLOR_MATCH));
|
color_attr_on(COLOR_PAIR(HH_COLOR_MATCH));
|
||||||
}
|
}
|
||||||
char* p;
|
char* p=NULL;
|
||||||
char* pp;
|
char* pp=NULL;
|
||||||
char* keywordsSavePtr;
|
char* keywordsSavePtr=NULL;
|
||||||
char* keywordsToken;
|
char* keywordsToken=NULL;
|
||||||
char* keywordsParsedLine;
|
char* keywordsParsedLine=NULL;
|
||||||
char* keywordsPointerToDelete;
|
char* keywordsPointerToDelete=NULL;
|
||||||
|
|
||||||
switch(hstr->historyMatch) {
|
switch(hstr->historyMatch) {
|
||||||
case HH_MATCH_SUBSTRING:
|
case HH_MATCH_SUBSTRING:
|
||||||
|
|
Loading…
Reference in a new issue