Changeset 4ccf4d7c in tol


Ignore:
Timestamp:
Aug 21, 2015, 4:51:40 PM (11 years ago)
Author:
Jorge Pérez <josp.jorge@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
33fc49e
Parents:
2f7a97d
Message:

rightBranch debe inicializarse para no retornar un valor invalido en caso de isEmpty() sea cierto

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@6821 be4846ae-f051-483a-831f-b64e7d08527f

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tol/bbasic/tree.cpp

    r2f7a97d r4ccf4d7c  
    9494//--------------------------------------------------------------------
    9595{
    96     List* rightBranch;
    97     if (!isEmpty()) {
    98         rightBranch = tree_;
    99         while (rightBranch->cdr()) {
    100             rightBranch = rightBranch->cdr();
    101         }
    102     }
     96    List* rightBranch = NULL;
     97    if (!isEmpty())
     98      {
     99      rightBranch = tree_;
     100      while (rightBranch->cdr())
     101        {
     102        rightBranch = rightBranch->cdr();
     103        }
     104      }
    103105    return (rightBranch);
    104106}
Note: See TracChangeset for help on using the changeset viewer.