This repository was archived by the owner on Oct 24, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ namespace Sass {
2424
2525 size_t L = in.size (), n = 0 ;
2626
27+ if (L == 0 ) return {};
2728 // Exit early if any entry is empty
2829 for (size_t i = 0 ; i < L; i += 1 ) {
2930 if (in[i].size () == 0 ) return {};
@@ -80,12 +81,18 @@ namespace Sass {
8081
8182 size_t L = in.size ();
8283 size_t n = in.size () - 1 ;
84+
85+ if (L == 0 ) return {};
86+ // Exit early if any entry is empty
87+ for (size_t i = 0 ; i < L; i += 1 ) {
88+ if (in[i].size () == 0 ) return {};
89+ }
90+
8391 size_t * state = new size_t [L];
8492 std::vector< std::vector<T>> out;
8593
8694 // First initialize all states for every permutation group
8795 for (size_t i = 0 ; i < L; i += 1 ) {
88- if (in[i].size () == 0 ) return {};
8996 state[i] = in[i].size () - 1 ;
9097 }
9198
@@ -104,10 +111,8 @@ namespace Sass {
104111 // Current group finished
105112 if (state[n] == 0 ) {
106113 // Find position of next decrement
107- while (n > 0 && state[--n] == 0 )
108- {
114+ while (n > 0 && state[--n] == 0 ) {}
109115
110- }
111116 // Check for end condition
112117 if (state[n] != 0 ) {
113118 // Decrease next on the left side
You can’t perform that action at this time.
0 commit comments