From 32c175ac5595207b710411892a563b3bf73b39fc Mon Sep 17 00:00:00 2001 From: Kazuki Sakamoto Date: Thu, 17 Nov 2016 08:56:18 -0800 Subject: [PATCH] Workaround fix for Visual Studio Summary: - Problem: Build error in Visual Studio since an array cannot have zero size. - https://github.com/facebook/css-layout/commit/e6702e1168f7878a30a056548bc754ce1d61074f#commitcomment-19839659 - Solution: Add 1 until we'll have actual CSSExperimentalFeature value. Reviewed By: emilsjolander Differential Revision: D4191268 fbshipit-source-id: 53fdcc388292e76c2b97ad071f0d7c27d0613ecf --- CSSLayout/CSSLayout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CSSLayout/CSSLayout.c b/CSSLayout/CSSLayout.c index 51d18593..dd38a20c 100644 --- a/CSSLayout/CSSLayout.c +++ b/CSSLayout/CSSLayout.c @@ -2519,7 +2519,7 @@ void CSSLog(CSSLogLevel level, const char *format, ...) { va_end(args); } -static bool experimentalFeatures[CSSExperimentalFeatureCount]; +static bool experimentalFeatures[CSSExperimentalFeatureCount + 1]; void CSSLayoutSetExperimentalFeatureEnabled(CSSExperimentalFeature feature, bool enabled) { experimentalFeatures[feature] = enabled;