diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-02-26 13:46:21 -0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-02-26 13:46:21 -0800 |
commit | ad7c5886bc62d2d36d458b9769a6294bffb030da (patch) | |
tree | ee712fb32b0937438bc7e0ad6078443ccaf71133 /complete.cpp | |
parent | b30090f9461f246053b846173c81682018901c7e (diff) |
Fix a crash in complete -C
Diffstat (limited to 'complete.cpp')
-rw-r--r-- | complete.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/complete.cpp b/complete.cpp index b6c7499a..b203b4a8 100644 --- a/complete.cpp +++ b/complete.cpp @@ -1507,8 +1507,8 @@ bool completer_t::complete_variable(const wcstring &str, int start_offset) */ bool completer_t::try_complete_variable( const wcstring &str ) { - size_t i, len = str.size(); - for( i=len-1; i>=0; i-- ) + size_t i = str.size(); + while (i--) { wchar_t c = str.at(i); if( c == L'$' ) |